]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
Revert "Utils: fix help section normalization"
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Nov 2020 15:26:27 +0000 (16:26 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 10 Nov 2020 15:26:27 +0000 (16:26 +0100)
replaceAll is not supported by all browser we try to guarantee to
support.

This reverts commit f7b816a39987b37ebcc976eb78cf33da2ad37bf3.

src/Utils.js

index 781c95d7fc79ce25a31d936b82e172f6387b0695..7710e39d084f78237ef344af618dc277084a687c 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.replaceAll('_', '-');
+       let section_minus_normalized = section.replace(/_/, '-');
        if (helpMap[section_minus_normalized]) {
            return helpMap[section_minus_normalized];
        }
-       let section_underscore_normalized = section.replaceAll('-', '_');
+       let section_underscore_normalized = section.replace(/-/, '_');
        return helpMap[section_underscore_normalized];
     },