mirror of
https://github.com/golang/go
synced 2024-11-18 10:14:45 -07:00
unicode: move scripts from FoldCategories to FoldScripts
Copy-and-paste bug was putting scripts in the categories map. Fixes #18186. Change-Id: Ife9d9bdd346fe24e578dbb2a0aac7ef6e889ae68 Reviewed-on: https://go-review.googlesource.com/45830 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
90a8b7361c
commit
82abd4152d
@ -1201,7 +1201,7 @@ func printCasefold() {
|
||||
scr := make(map[string]map[rune]bool)
|
||||
for name := range scripts {
|
||||
if x := foldExceptions(inScript(name)); len(x) > 0 {
|
||||
cat[name] = x
|
||||
scr[name] = x
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7311,9 +7311,6 @@ var caseOrbit = []foldPair{
|
||||
// simple case folding to code points inside the category.
|
||||
// If there is no entry for a category name, there are no such points.
|
||||
var FoldCategory = map[string]*RangeTable{
|
||||
"Common": foldCommon,
|
||||
"Greek": foldGreek,
|
||||
"Inherited": foldInherited,
|
||||
"L": foldL,
|
||||
"Ll": foldLl,
|
||||
"Lt": foldLt,
|
||||
@ -7322,25 +7319,6 @@ var FoldCategory = map[string]*RangeTable{
|
||||
"Mn": foldMn,
|
||||
}
|
||||
|
||||
var foldCommon = &RangeTable{
|
||||
R16: []Range16{
|
||||
{0x039c, 0x03bc, 32},
|
||||
},
|
||||
}
|
||||
|
||||
var foldGreek = &RangeTable{
|
||||
R16: []Range16{
|
||||
{0x00b5, 0x0345, 656},
|
||||
},
|
||||
}
|
||||
|
||||
var foldInherited = &RangeTable{
|
||||
R16: []Range16{
|
||||
{0x0399, 0x03b9, 32},
|
||||
{0x1fbe, 0x1fbe, 1},
|
||||
},
|
||||
}
|
||||
|
||||
var foldL = &RangeTable{
|
||||
R16: []Range16{
|
||||
{0x0345, 0x0345, 1},
|
||||
@ -7609,7 +7587,30 @@ var foldMn = &RangeTable{
|
||||
// code points outside the script that are equivalent under
|
||||
// simple case folding to code points inside the script.
|
||||
// If there is no entry for a script name, there are no such points.
|
||||
var FoldScript = map[string]*RangeTable{}
|
||||
var FoldScript = map[string]*RangeTable{
|
||||
"Common": foldCommon,
|
||||
"Greek": foldGreek,
|
||||
"Inherited": foldInherited,
|
||||
}
|
||||
|
||||
var foldCommon = &RangeTable{
|
||||
R16: []Range16{
|
||||
{0x039c, 0x03bc, 32},
|
||||
},
|
||||
}
|
||||
|
||||
var foldGreek = &RangeTable{
|
||||
R16: []Range16{
|
||||
{0x00b5, 0x0345, 656},
|
||||
},
|
||||
}
|
||||
|
||||
var foldInherited = &RangeTable{
|
||||
R16: []Range16{
|
||||
{0x0399, 0x03b9, 32},
|
||||
{0x1fbe, 0x1fbe, 1},
|
||||
},
|
||||
}
|
||||
|
||||
// Range entries: 3576 16-bit, 1454 32-bit, 5030 total.
|
||||
// Range bytes: 21456 16-bit, 17448 32-bit, 38904 total.
|
||||
|
Loading…
Reference in New Issue
Block a user