mirror of
git://git.proxmox.com/git/pve-docs.git
synced 2025-01-06 13:17:48 +03:00
asciidoc-pve: disallow certain characters in onlineHelp keys
this removes the lazily evaluated part of the regex used to detect `onlineHelp` keys in order to match them with asciidoc anchors in the documentation. it uses a pattern that excludes curly braces, brackets and quotations instead. this allows for greedy matching and also removes an issue where keys that are set via CBind were included incorrectly. the script would try to find an anchor name that was equivalent to the CBind placeholder, which would fail. since brackets, curly braces and quotation marks aren't allowed in asciidoc anchors anyway, excluding them like this should be safe. Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
This commit is contained in:
parent
4e7f60c220
commit
1f0e8a1624
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user