mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-28 03:55:02 +00:00
onlineHelp: try finding - and _ normalized blockid variants
allows easy support of both separation variants, commonly used in asciidoc or sphinx. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
4f3b2a9398
commit
7f56fd0cb0
12
src/Utils.js
12
src/Utils.js
@ -793,7 +793,17 @@ utilities: {
|
||||
throw "no global OnlineHelpInfo map declared";
|
||||
}
|
||||
|
||||
return helpMap[section];
|
||||
if (helpMap[section]) {
|
||||
return helpMap[section];
|
||||
}
|
||||
// try to normalize - and _ separators, to support asciidoc and sphinx
|
||||
// references at the same time.
|
||||
let section_minus_normalized = section.replace(/_/, '-');
|
||||
if (helpMap[section_minus_normalized]) {
|
||||
return helpMap[section_minus_normalized];
|
||||
}
|
||||
let section_underscore_normalized = section.replace(/-/, '_');
|
||||
return helpMap[section_underscore_normalized];
|
||||
},
|
||||
|
||||
get_help_link: function(section) {
|
||||
|
Loading…
Reference in New Issue
Block a user