We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86d8218 commit 061b9b5Copy full SHA for 061b9b5
src/main/js/util/dom.js
@@ -6,15 +6,7 @@ export function createElementFromHtml(html) {
6
7
export function toId(string) {
8
const trimmed = string.trim();
9
- const ascii = trimmed.replace(/[\W_]+/g, "-").toLowerCase();
10
-
11
- // If ASCII stripping produces something meaningful, keep old behavior
12
- if (ascii && ascii !== "-") {
13
- return ascii;
14
- }
15
16
- // Fallback for non-ASCII locales (CJK, etc.)
17
return Array.from(trimmed)
18
- .map(c => c.codePointAt(0).toString(16))
+ .map((c) => c.codePointAt(0).toString(16))
19
.join("-");
20
}
0 commit comments