Further wiki slug normalization

This commit is contained in:
2026-05-21 22:17:56 +02:00
parent 43fee721db
commit a0af6315b9
3 changed files with 51 additions and 14 deletions
+11 -9
View File
@@ -1241,15 +1241,17 @@ func TestWikiPageSlugOverridesChangeTargets(t *testing.T) {
func TestWikiSlugifyTitleNormalizesPunctuationAndSeparators(t *testing.T) {
tests := map[string]string{
`Grandmaster's Battle Momentum`: "grandmasters-battle-momentum",
`Bigbys Clenched Fist`: "bigbys-clenched-fist",
`"Quoted" Curly “Title”`: "quoted-curly-title",
`Hardiness vs. Enchantments`: "hardiness-vs-enchantments",
`Clairaudience/Clairvoyance`: "clairaudience-clairvoyance",
`Moon-on-a-Stick`: "moon-on-a-stick",
`Élite & Noble Houses`: "elite-noble-houses",
`Rock 'n' Roll`: "rock-n-roll",
`Melf's Acid Arrow`: "melfs-acid-arrow",
`Grandmaster's Battle Momentum`: "grandmasters-battle-momentum",
`Bigbys Clenched Fist`: "bigbys-clenched-fist",
`"Quoted" Curly “Title”`: "quoted-curly-title",
`Hardiness vs. Enchantments`: "hardiness-vs-enchantments",
`Clairaudience/Clairvoyance`: "clairaudience-clairvoyance",
`Moon-on-a-Stick`: "moon-on-a-stick",
`Élite & Noble Houses`: "elite-noble-houses",
`Rock 'n' Roll`: "rock-n-roll",
`Melf's Acid Arrow`: "melfs-acid-arrow",
`Alpha!@#$%^&*()[]-=_+/?.,<>` + "`" + `~|\Omega`: "alpha-omega",
`Æther Œuvre Øresund Straße Þorn Łódź Đelta`: "aether-oeuvre-oresund-strasse-thorn-lodz-delta",
}
for input, want := range tests {
if got := wikiSlugifyTitle(input); got != want {