all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH cluster 1/4] parse datacenter config: remove "\s*" from comment regex
@ 2022-02-24 14:21 Stefan Sterz
  2022-02-24 14:21 ` [pve-devel] [PATCH manager 2/4] parse node " Stefan Sterz
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Stefan Sterz @ 2022-02-24 14:21 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-27  9:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24 14:21 [pve-devel] [PATCH cluster 1/4] parse datacenter config: remove "\s*" from comment regex Stefan Sterz
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

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