NodeConfig: simplify description parsing

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-01-15 18:34:17 +01:00
parent 354f5fffc7
commit e61f1629e7

View File

@ -128,11 +128,7 @@ sub parse_node_config {
my @lines = split(/\n/, $content);
foreach my $line (@lines) {
if ($line =~ /^\#(.*)\s*$/) {
$descr .= PVE::Tools::decode_text($1) . "\n";
next;
}
if ($line =~ /^description:\s*(.*\S)\s*$/) {
if ($line =~ /^\#(.*)\s*$/ || $line =~ /^description:\s*(.*\S)\s*$/) {
$descr .= PVE::Tools::decode_text($1) . "\n";
next;
}