all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Sterz <s.sterz@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 2/4] parse node config: remove "\s*" from comment regex
Date: Thu, 24 Feb 2022 15:21:49 +0100	[thread overview]
Message-ID: <20220224142151.3206908-2-s.sterz@proxmox.com> (raw)
In-Reply-To: <20220224142151.3206908-1-s.sterz@proxmox.com>

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>
---
 PVE/NodeConfig.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/NodeConfig.pm b/PVE/NodeConfig.pm
index df44410f..4c2fc570 100644
--- a/PVE/NodeConfig.pm
+++ b/PVE/NodeConfig.pm
@@ -205,7 +205,7 @@ sub parse_node_config {
 
     my @lines = split(/\n/, $content);
     foreach my $line (@lines) {
-	if ($line =~ /^\#(.*)\s*$/ || $line =~ /^description:\s*(.*\S)\s*$/) {
+	if ($line =~ /^\#(.*)$/ || $line =~ /^description:\s*(.*\S)\s*$/) {
 	    $descr .= PVE::Tools::decode_text($1) . "\n";
 	    next;
 	}
-- 
2.30.2





  reply	other threads:[~2022-02-24 14:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24 14:21 [pve-devel] [PATCH cluster 1/4] parse datacenter " Stefan Sterz
2022-02-24 14:21 ` Stefan Sterz [this message]
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-2-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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal