all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* Re: [pve-devel] [PATCH qemu-server v2 4/4] parse vm config: remove "\s*" from multi-line comment regex
@ 2022-02-24 16:28 Dietmar Maurer
  2022-02-25  8:26 ` Stefan Sterz
  0 siblings, 1 reply; 3+ messages in thread
From: Dietmar Maurer @ 2022-02-24 16:28 UTC (permalink / raw)
  To: Proxmox VE development discussion, Stefan Sterz


> On 02/24/2022 3:49 PM Stefan Sterz <s.sterz@proxmox.com> wrote:
> 
>  
> 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.

But the old regex trimm spaces from the end, so this is quite different!




^ permalink raw reply	[flat|nested] 3+ messages in thread
* [pve-devel] [PATCH qemu-server v2 4/4] parse vm config: remove "\s*" from multi-line comment regex
@ 2022-02-24 14:49 Stefan Sterz
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Sterz @ 2022-02-24 14:49 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>
---

There was a typo in the previous version of this patch, thanks to 
@oguz for spotting it.

 PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 243c2e5..2347183 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2366,7 +2366,7 @@ sub parse_vm_config {
 	    next;
 	}
 
-	if ($line =~ m/^\#(.*)\s*$/) {
+	if ($line =~ m/^\#(.*)$/) {
 	    $descr = '' if !defined($descr);
 	    $descr .= PVE::Tools::decode_text($1) . "\n";
 	    next;
-- 
2.30.2





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

end of thread, other threads:[~2022-02-25  8:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24 16:28 [pve-devel] [PATCH qemu-server v2 4/4] parse vm config: remove "\s*" from multi-line comment regex Dietmar Maurer
2022-02-25  8:26 ` Stefan Sterz
  -- strict thread matches above, loose matches on Subject: below --
2022-02-24 14:49 Stefan Sterz

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