Files
website/util/unicode_case_folding.go
T
terbshaeusser ad273dbe5d Squashed 'backend/goldmark/' content from commit 379bf24
git-subtree-dir: backend/goldmark
git-subtree-split: 379bf24a47e6ef07f34d7536aead86d8792ac300
2026-05-24 09:40:13 +02:00

18 lines
575 B
Go

package util
//go:generate go run ../_tools unicode-case-folding-map -o ../_tools/unicode-case-folding-map.json
//go:generate go run ../_tools emb-structs -i ../_tools/unicode-case-folding-map.json -o ./unicode_case_folding.gen.go
var unicodeCaseFoldings map[rune][]rune
func init() {
unicodeCaseFoldings = make(map[rune][]rune, _unicodeCaseFoldingLength)
cTo := 0
for i := range _unicodeCaseFoldingLength {
tTo := cTo + int(_unicodeCaseFoldingToIndex[i])
to := _unicodeCaseFoldingTo[cTo:tTo]
unicodeCaseFoldings[_unicodeCaseFoldingFrom[i]] = to
cTo = tTo
}
}