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 docs v2 2/2] asciidoc-pve: ignore anchor names in curly braces
Date: Fri, 11 Nov 2022 16:05:26 +0100	[thread overview]
Message-ID: <20221111150527.538248-3-s.sterz@proxmox.com> (raw)
In-Reply-To: <20221111150527.538248-1-s.sterz@proxmox.com>

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@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





  parent reply	other threads:[~2022-11-11 15:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 15:05 [pve-devel] [PATCH docs v2 0/2] pve fix help buttons by accounting for keys in widget toolkit Stefan Sterz
2022-11-11 15:05 ` [pve-devel] [PATCH docs v2 1/2] pveum: add the "user_mgmt" reference to the documentation Stefan Sterz
2022-11-11 18:24   ` [pve-devel] applied: " Thomas Lamprecht
2022-11-11 15:05 ` Stefan Sterz [this message]
2022-11-11 18:22   ` [pve-devel] [PATCH docs v2 2/2] asciidoc-pve: ignore anchor names in curly braces Thomas Lamprecht
2022-11-14  8:26     ` Stefan Sterz
2022-11-14 10:07       ` Thomas Lamprecht
2022-11-14 10:13         ` Stefan Sterz
2022-11-14 10:16           ` Thomas Lamprecht
2022-11-11 15:05 ` [pve-devel] [PATCH manager v2 1/1] fix #4328: ui: add widget toolkit to dependencies of OnlineHelpInfo.js Stefan Sterz

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=20221111150527.538248-3-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