]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
utils: get help info: fix normalization with multiple minuses
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Nov 2020 15:27:43 +0000 (16:27 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Nov 2020 15:27:43 +0000 (16:27 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/Utils.js

index 7710e39d084f78237ef344af618dc277084a687c..7b78eeb12a5ecdc97f7367820148328264a17433 100644 (file)
@@ -777,11 +777,11 @@ utilities: {
        }
        // try to normalize - and _ separators, to support asciidoc and sphinx
        // references at the same time.
-       let section_minus_normalized = section.replace(/_/, '-');
+       let section_minus_normalized = section.replace(/_/g, '-');
        if (helpMap[section_minus_normalized]) {
            return helpMap[section_minus_normalized];
        }
-       let section_underscore_normalized = section.replace(/-/, '_');
+       let section_underscore_normalized = section.replace(/-/g, '_');
        return helpMap[section_underscore_normalized];
     },