From 63ec56e5bc8cd814267e493de73179d62246b8bd Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 10 Nov 2020 16:27:43 +0100 Subject: [PATCH] utils: get help info: fix normalization with multiple minuses Signed-off-by: Thomas Lamprecht --- src/Utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Utils.js b/src/Utils.js index 7710e39..7b78eeb 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.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]; },