From: Stefan Sterz <s.sterz@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH cluster 1/4] parse datacenter config: remove "\s*" from comment regex
Date: Thu, 24 Feb 2022 15:21:48 +0100 [thread overview]
Message-ID: <20220224142151.3206908-1-s.sterz@proxmox.com> (raw)
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/PVE/DataCenterConfig.pm b/data/PVE/DataCenterConfig.pm
index 6c0fa5b..8e51ba3 100644
--- a/data/PVE/DataCenterConfig.pm
+++ b/data/PVE/DataCenterConfig.pm
@@ -236,7 +236,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";
}
}
--
2.30.2
next reply other threads:[~2022-02-24 14:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-24 14:21 Stefan Sterz [this message]
2022-02-24 14:21 ` [pve-devel] [PATCH manager 2/4] parse node " Stefan Sterz
2022-02-24 14:21 ` [pve-devel] [PATCH container 3/4] parse pct config: remove "\s*" from multi-line " Stefan Sterz
2022-02-24 14:21 ` [pve-devel] [PATCH qemu-server 4/4] parse vm " Stefan Sterz
2022-04-27 9:21 ` Thomas Lamprecht
2022-04-27 6:56 ` [pve-devel] applied-series: [PATCH cluster 1/4] parse datacenter config: remove "\s*" from " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220224142151.3206908-1-s.sterz@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.