From 934494b5f3ee610d6473b3ca4c21c80731c213af Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 21 Sep 2025 12:46:39 -0300 Subject: find: kebab-fuzzy matches in content text Outside content text, this doesn't cause miscapitalized references to slip past, but it does stop them from being specially reported i.e. highlighting which letters need to be updated or treating as more than just "nothing matches for this reference" generic errors. That's a TODO. Sorry! Gyeep! --- src/common-util/wiki-data.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/common-util') diff --git a/src/common-util/wiki-data.js b/src/common-util/wiki-data.js index 0f6591c1..3fde2495 100644 --- a/src/common-util/wiki-data.js +++ b/src/common-util/wiki-data.js @@ -11,7 +11,7 @@ export {filterMultipleArrays} from './sugar.js'; // Generic value operations -export function getKebabCase(name) { +export function getCaseSensitiveKebabCase(name) { return name // Spaces to dashes @@ -53,9 +53,10 @@ export function getKebabCase(name) { // Trim dashes on boundaries .replace(/^-+|-+$/g, '') +} - // Always lowercase - .toLowerCase(); +export function getKebabCase(name) { + return getCaseSensitiveKebabCase(name).toLowerCase(); } // Specific data utilities -- cgit 1.3.0-6-gf8a5