Squashed 'backend/goldmark/' content from commit 379bf24
git-subtree-dir: backend/goldmark git-subtree-split: 379bf24a47e6ef07f34d7536aead86d8792ac300
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user