diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-09-21 12:46:39 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-09-21 12:46:39 -0300 |
commit | 934494b5f3ee610d6473b3ca4c21c80731c213af (patch) | |
tree | 06bd69c1ca93d326e582df5cf303875eab341d56 /src/common-util/wiki-data.js | |
parent | 72d9bf3ca4beaee26a59e5c68023d20ec1513f65 (diff) |
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!
Diffstat (limited to 'src/common-util/wiki-data.js')
-rw-r--r-- | src/common-util/wiki-data.js | 7 |
1 files changed, 4 insertions, 3 deletions
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 |