[pve-devel] [PATCH widget-toolkit] Utils: fix help section normalization
Aaron Lauterer
a.lauterer at proxmox.com
Tue Nov 10 10:34:13 CET 2020
We need to replace all occurences when normalizing underscores or
dashes.
Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
src/Utils.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Utils.js b/src/Utils.js
index 7710e39..781c95d 100644
--- a/src/Utils.js
+++ b/src/Utils.js
@@ -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.replaceAll('_', '-');
if (helpMap[section_minus_normalized]) {
return helpMap[section_minus_normalized];
}
- let section_underscore_normalized = section.replace(/-/, '_');
+ let section_underscore_normalized = section.replaceAll('-', '_');
return helpMap[section_underscore_normalized];
},
--
2.20.1
More information about the pve-devel
mailing list