From f7b816a39987b37ebcc976eb78cf33da2ad37bf3 Mon Sep 17 00:00:00 2001 From: Aaron Lauterer Date: Tue, 10 Nov 2020 10:34:13 +0100 Subject: [PATCH] Utils: fix help section normalization We need to replace all occurences when normalizing underscores or dashes. Signed-off-by: Aaron Lauterer --- 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]; },