From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH widget-toolkit] Utils: fix help section normalization
Date: Tue, 10 Nov 2020 10:34:13 +0100 [thread overview]
Message-ID: <20201110093413.14544-1-a.lauterer@proxmox.com> (raw)
We need to replace all occurences when normalizing underscores or
dashes.
Signed-off-by: Aaron Lauterer <a.lauterer@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
next reply other threads:[~2020-11-10 9:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 9:34 Aaron Lauterer [this message]
2020-11-10 10:53 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201110093413.14544-1-a.lauterer@proxmox.com \
--to=a.lauterer@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox