Skip to content

fix(text): give one slug to spellings of a non-ASCII name that differ in case or spacing - #15

Merged
maxgfr merged 1 commit into
mainfrom
fix/consumer-compat
Sep 30, 2026
Merged

maxgfr merged 1 commit into
mainfrom
fix/consumer-compat

Conversation

@maxgfr

@maxgfr maxgfr commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Since v1.21.0 a slug that has to drop non-ASCII letters ends in a hash of its input — but the hash was taken before separators were folded, so slugify("Düsseldorf") and slugify("DÜSSELDORF ") gave two keys (d-sseldorf-0b0133a9 / d-sseldorf-2a4ff434) while Hebden Bridge and HEBDEN BRIDGE always shared one.

ultraprospect keys stored snapshots by place name, so its test pinning that equality fails, and its daily engine repin has been refused since 2026-09-28.

  • the hash is now of the canonical form (case and separators folded, letters kept): 项目 and 文档 stay distinct;
  • dash runs left by dropped letters are folded in the readable part — only for non-ASCII input, so every ASCII slug keeps its exact historical name (the linear-time and truncation tests are unchanged).

Test: slugify "gives one key to spellings of a non-ASCII name that differ only in case and separators" — red on main, green here.

… in case or spacing

Since v1.21.0 a slug that drops non-ASCII letters ends in a hash of the
input, and the hash was taken before separators were folded: "Düsseldorf"
and "DÜSSELDORF " got two keys while "Hebden Bridge" and "HEBDEN BRIDGE "
shared one. A consumer keying stored snapshots by place name lost them, and
its daily engine repin has failed since. The hash is now of the canonical
form, and dash runs left by dropped letters are folded in the readable part;
every ASCII slug keeps its name.
@maxgfr
maxgfr merged commit 251294b into main Sep 30, 2026
3 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.26.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@maxgfr
maxgfr deleted the fix/consumer-compat branch September 30, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant