[pve-devel] [PATCH docs v2 2/2] asciidoc-pve: ignore anchor names in curly braces

Stefan Sterz s.sterz at proxmox.com
Fri Nov 11 16:05:26 CET 2022


previously the scanner would detect some `onlineHelp` keys that are
set via CBind as anchor names. this would cause it to fail, as they
cannot be present anywhere in the documentation. no valid anchor name
can be wrapped in curly braces, as they need to be valid xml names.
hence it should be safe to just ignore all keys wrapped in curly
braces.

Signed-off-by: Stefan Sterz <s.sterz at proxmox.com>
---
 asciidoc-pve.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/asciidoc-pve.in b/asciidoc-pve.in
index d638a38..c536371 100644
--- a/asciidoc-pve.in
+++ b/asciidoc-pve.in
@@ -465,7 +465,7 @@ sub scan_extjs_file {
     debug("scan-extjs $filename");
 
     while(defined(my $line = <$fh>)) {
-	if ($line =~ m/\s+onlineHelp:\s*[\'\"](.*?)[\'\"]/) {
+	if ($line =~ m/\s+onlineHelp:\s*[\'\"]([^{].*?[^}])[\'\"]/) {
 	    my $blockid = $1;
 	    my $link = $fileinfo->{blockid_target}->{default}->{$blockid};
 	    die "undefined blockid '$blockid' ($filename, line $.)\n"
-- 
2.30.2






More information about the pve-devel mailing list