]> git.proxmox.com Git - pve-cluster.git/commitdiff
parse datacenter config: remove "\s*" from comment regex
authorStefan Sterz <s.sterz@proxmox.com>
Thu, 24 Feb 2022 14:21:48 +0000 (15:21 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 27 Apr 2022 06:15:45 +0000 (08:15 +0200)
To be consistent with PBS's implementation of multi-line comments
remove "\s*" here too. Since the regex isn't lazy .* matches
everything \s* would anyway. (Note that new lines occurs after "$").

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
data/PVE/DataCenterConfig.pm

index e27e7ac7af8d71943feabea479008829dfc2eebb..782abea38af0867e9924602dfc8eacd7705b2de3 100644 (file)
@@ -264,7 +264,7 @@ sub parse_datacenter_config {
     # description may be comment or key-value pair (or both)
     my $comment = '';
     for my $line (split(/\n/, $raw)) {
-       if ($line =~ /^\#(.*)\s*$/) {
+       if ($line =~ /^\#(.*)$/) {
            $comment .= PVE::Tools::decode_text($1) . "\n";
        }
     }