Skip to content

Commit

Permalink
fix: remove not needed unicode checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludmil Simeonov committed Jul 23, 2024
1 parent b38b781 commit f8678ab
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -891,8 +891,6 @@ func isName(r rune) bool {
return string(r) != ":" && string(r) != "/" &&
(unicode.Is(first, r) ||
unicode.Is(second, r) ||
unicode.Is(cyrillic, r) ||
unicode.Is(greek, r) ||
string(r) == "*")
}

Expand Down Expand Up @@ -1241,19 +1239,3 @@ var second = &unicode.RangeTable{
{0x30FC, 0x30FE, 1},
},
}

var cyrillic = &unicode.RangeTable{
R16: []unicode.Range16{
{Lo: 0x0400, Hi: 0x04FF, Stride: 1}, // Cyrillic
{Lo: 0x0500, Hi: 0x052F, Stride: 1}, // Cyrillic Supplement
{Lo: 0x2DE0, Hi: 0x2DFF, Stride: 1}, // Cyrillic Extended-A
{Lo: 0xA640, Hi: 0xA69F, Stride: 1}, // Cyrillic Extended-B
},
}

var greek = &unicode.RangeTable{
R16: []unicode.Range16{
{Lo: 0x0370, Hi: 0x03FF, Stride: 1}, // Greek and Coptic
{Lo: 0x1F00, Hi: 0x1FFF, Stride: 1}, // Greek Extended
},
}

0 comments on commit f8678ab

Please sign in to comment.