projects
/
pve-cluster.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cc6e73
)
parse datacenter config: remove "\s*" from comment regex
author
Stefan Sterz
<s.sterz@proxmox.com>
Thu, 24 Feb 2022 14:21:48 +0000
(15:21 +0100)
committer
Thomas 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
patch
|
blob
|
blame
|
history
diff --git
a/data/PVE/DataCenterConfig.pm
b/data/PVE/DataCenterConfig.pm
index e27e7ac7af8d71943feabea479008829dfc2eebb..782abea38af0867e9924602dfc8eacd7705b2de3 100644
(file)
--- a/
data/PVE/DataCenterConfig.pm
+++ b/
data/PVE/DataCenterConfig.pm
@@
-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";
}
}