Align slug transliteration with bDS2
This commit is contained in:
@@ -74,9 +74,9 @@ use "./metadata_diff.allium" as metadata_diff -- DB/filesystem diff and rebuil
|
||||
|
||||
-- Resolved questions:
|
||||
--
|
||||
-- 1. Slug generation scope: only German and English letters are used.
|
||||
-- Verify transliteration preserves the established bDS behaviour for
|
||||
-- ä/ö/ü/ß/ÄÖÜ.
|
||||
-- 1. Slug generation is identical to bDS2: replace ß with "ss", normalize to
|
||||
-- Unicode NFD, discard non-ASCII code points, lowercase, hyphenate
|
||||
-- non-alphanumeric runs, and trim hyphens. Thus ä/ö/ü become a/o/u.
|
||||
--
|
||||
-- 2. Liquid subset: see template.allium for the exact subset.
|
||||
-- Only 5 tags, 4 standard filters, 2 custom filters, 5 operators.
|
||||
|
||||
@@ -14,10 +14,11 @@ enum PostStatus {
|
||||
value Slug {
|
||||
value: String
|
||||
|
||||
-- Generated by: transliterate unicode to ASCII, lowercase,
|
||||
-- replace [^a-z0-9]+ with hyphens, strip leading/trailing hyphens
|
||||
-- Transliteration scope: only German (ä/ö/ü/ß/ÄÖÜ) and English letters used.
|
||||
-- Verify transliteration matches the established bDS behaviour for this set.
|
||||
-- Generated exactly as bDS2: replace ß with "ss", normalize to Unicode NFD,
|
||||
-- discard every non-ASCII code point, lowercase, replace [^a-z0-9]+ with
|
||||
-- hyphens, then strip leading/trailing hyphens.
|
||||
-- Therefore ä/ö/ü/Ä/Ö/Ü become a/o/u/A/O/U through NFD decomposition;
|
||||
-- examples: "Über" -> "uber", "ÄÖÜäöüß" -> "aouaouss".
|
||||
-- Uniqueness: tries base, then {slug}-2, {slug}-3, … (unbounded numeric suffix)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user