mirror of
https://github.com/docker/cli.git
synced 2026-11-06 13:10:41 -04:00
vendor: github.com/mattn/go-runewidth v0.0.31
- Treat the remaining invisible format controls as zero width - Treat bidi isolates and other invisible format characters as zero width - Measure ambiguous Latin letters as one cell in East Asian locales - Fix width mismatches found by the Hegel property tests - Recognise CJK locales regardless of charset spelling full diff: https://github.com/mattn/go-runewidth/compare/v0.0.30...v0.0.31 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ require (
|
||||
github.com/google/go-cmp v0.7.0
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/mattn/go-runewidth v0.0.30
|
||||
github.com/mattn/go-runewidth v0.0.31
|
||||
github.com/moby/go-archive v0.3.3
|
||||
github.com/moby/moby/api v1.56.1
|
||||
github.com/moby/moby/client v0.6.1
|
||||
|
||||
+2
-2
@@ -82,8 +82,8 @@ github.com/klauspost/compress v1.20.1 h1:T7kKElXUMXrUJ2E9QhQhxFtcK5rPyLdsGZvdbLM
|
||||
github.com/klauspost/compress v1.20.1/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI=
|
||||
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
|
||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||
github.com/mattn/go-runewidth v0.0.30 h1:+KUuiDA4fF0R1p5FeueHefjDm+GIM+kWfFnDjybOPgk=
|
||||
github.com/mattn/go-runewidth v0.0.30/go.mod h1:3qAiGCV4Koz/yuveO58qUefmUTRm8r0IGEXZ9jeHp/8=
|
||||
github.com/mattn/go-runewidth v0.0.31 h1:1oCV4ReTlosDBc6rYRw5cL8S/4y8iv5oRl4SJ5IBgwo=
|
||||
github.com/mattn/go-runewidth v0.0.31/go.mod h1:3qAiGCV4Koz/yuveO58qUefmUTRm8r0IGEXZ9jeHp/8=
|
||||
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
|
||||
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
|
||||
github.com/moby/go-archive v0.3.3 h1:OxxR9paxsluYi+zDUEXTTaIxtkK3viymW+Ka7vRhhME=
|
||||
|
||||
+5
@@ -15,6 +15,11 @@ Usage
|
||||
runewidth.StringWidth("つのだ☆HIRO") == 12
|
||||
```
|
||||
|
||||
NOTE: Latin letters that Unicode gives ambiguous East Asian width, such as
|
||||
`ü`, `é` and `ß`, are measured as one cell even when `EastAsianWidth` is
|
||||
set, as terminals draw them in CJK locales too. Other ambiguous characters
|
||||
such as `±`, `×` and `○` still take two cells there.
|
||||
|
||||
|
||||
Author
|
||||
------
|
||||
|
||||
+100
-22
@@ -361,9 +361,11 @@ var private = table{
|
||||
|
||||
var nonprint = table{
|
||||
{0x0000, 0x001F}, {0x007F, 0x009F}, {0x00AD, 0x00AD},
|
||||
{0x070F, 0x070F}, {0x180B, 0x180E}, {0x200B, 0x200F},
|
||||
{0x2028, 0x202E}, {0x206A, 0x206F}, {0xD800, 0xDFFF},
|
||||
{0xFEFF, 0xFEFF}, {0xFFF9, 0xFFFB}, {0xFFFE, 0xFFFF},
|
||||
{0x061C, 0x061C}, {0x070F, 0x070F}, {0x180B, 0x180E},
|
||||
{0x200B, 0x200F}, {0x2028, 0x202E}, {0x2060, 0x2064},
|
||||
{0x2066, 0x206F}, {0xD800, 0xDFFF}, {0xFEFF, 0xFEFF},
|
||||
{0xFFF9, 0xFFFB}, {0xFFFE, 0xFFFF}, {0x13430, 0x1343F},
|
||||
{0x1BCA0, 0x1BCA3}, {0x1D173, 0x1D17A}, {0xE0001, 0xE0001},
|
||||
}
|
||||
|
||||
// Condition have flag EastAsianWidth whether the current locale is CJK or not.
|
||||
@@ -514,19 +516,77 @@ func isJoiner(r rune) bool {
|
||||
return inTable(r, joiner)
|
||||
}
|
||||
|
||||
// clusterText returns s to segment in place of s. When s ends in a lead
|
||||
// byte short of the bytes it promises, the segmenter gives up there and
|
||||
// glues everything from it onto the cluster before, where the two-cell cap
|
||||
// hides it, although the same bytes followed by anything else form
|
||||
// clusters of their own. Such a string gets NULs after it, enough for any
|
||||
// lead byte to be decoded; as controls they are clusters of their own, and
|
||||
// the loops over the clusters stop at len(s) before reaching them.
|
||||
func clusterText(s string) string {
|
||||
if endsShort(s) {
|
||||
return s + "\x00\x00\x00"
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
// endsShort reports whether one of the last three bytes of s is a lead
|
||||
// byte that needs more bytes than are left, which is where the segmenter
|
||||
// stops decoding. It only looks at the length the lead byte announces, not
|
||||
// at whether the bytes after it could continue it, as the segmenter does.
|
||||
func endsShort(s string) bool {
|
||||
for i := max(len(s)-3, 0); i < len(s); i++ {
|
||||
b, left := s[i], len(s)-i
|
||||
if b >= 0xC2 && b < 0xE0 && left < 2 ||
|
||||
b >= 0xE0 && b < 0xF0 && left < 3 ||
|
||||
b >= 0xF0 && b < 0xF8 && left < 4 {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// graphemeWidth returns the width of a single grapheme cluster: the sum of
|
||||
// the widths of its runes, capped at 2 cells. The cap keeps multi-rune
|
||||
// sequences that render as a single glyph (ZWJ emoji, flags, Hangul jamo)
|
||||
// from being counted wider than the two cells terminals give them.
|
||||
// the widths of its runes, with the part from the first rune that starts a
|
||||
// single glyph (an emoji, a regional indicator, a Hangul jamo or syllable)
|
||||
// capped at 2 cells. The cap keeps multi-rune sequences that render as one
|
||||
// glyph (ZWJ emoji, skin tones, flags, Hangul jamo) from being counted
|
||||
// wider than the two cells terminals give them. What comes before it, such
|
||||
// as a Prepend rune, and a cluster with no such rune, like a letter with a
|
||||
// skin tone modifier after it, are shown rune by rune and summed.
|
||||
func (c *Condition) graphemeWidth(cluster string) int {
|
||||
width := 0
|
||||
if r, size := utf8.DecodeRuneInString(cluster); size == len(cluster) {
|
||||
return c.RuneWidth(r) // one rune, never over the cap
|
||||
}
|
||||
width, glyph := 0, -1
|
||||
for _, r := range cluster {
|
||||
width += c.RuneWidth(r)
|
||||
w := c.RuneWidth(r)
|
||||
if glyph < 0 && r >= 0x1100 && startsGlyph(r) {
|
||||
glyph = 0
|
||||
}
|
||||
if glyph >= 0 {
|
||||
glyph += w
|
||||
} else {
|
||||
width += w
|
||||
}
|
||||
}
|
||||
if width > 2 {
|
||||
width = 2
|
||||
return width + min(max(glyph, 0), 2)
|
||||
}
|
||||
|
||||
// startsGlyph reports whether r begins a sequence that a terminal draws as
|
||||
// a single glyph however many runes it has.
|
||||
func startsGlyph(r rune) bool {
|
||||
switch {
|
||||
case 0x1100 <= r && r <= 0x11FF, // Hangul jamo
|
||||
0xA960 <= r && r <= 0xA97F, // Hangul jamo extended-A
|
||||
0xAC00 <= r && r <= 0xD7FF, // Hangul syllables, jamo extended-B
|
||||
0x1F1E6 <= r && r <= 0x1F1FF: // regional indicators
|
||||
return true
|
||||
case r < 0x203C, 0x3299 < r && r < 0x1F004:
|
||||
// Outside the emoji table: spares CJK text the search.
|
||||
return false
|
||||
}
|
||||
return width
|
||||
return inTable(r, emoji)
|
||||
}
|
||||
|
||||
// StringWidth return width as you can see
|
||||
@@ -536,6 +596,11 @@ func (c *Condition) StringWidth(s string) (width int) {
|
||||
if b < 0x20 || b == 0x7F {
|
||||
return 0
|
||||
}
|
||||
if b >= 0x80 {
|
||||
// Not UTF-8 on its own: measure it as the U+FFFD every other
|
||||
// path decodes it to, which is ambiguous width.
|
||||
return c.RuneWidth(utf8.RuneError)
|
||||
}
|
||||
return 1
|
||||
}
|
||||
if len(s) > 0 && len(s) <= utf8.UTFMax {
|
||||
@@ -565,8 +630,8 @@ graphemes:
|
||||
return
|
||||
}
|
||||
width = 0
|
||||
g := graphemes.FromString(s)
|
||||
for g.Next() {
|
||||
g := graphemes.FromString(clusterText(s))
|
||||
for g.Next() && g.Start() < len(s) {
|
||||
width += c.graphemeWidth(g.Value())
|
||||
}
|
||||
return
|
||||
@@ -597,8 +662,8 @@ func (c *Condition) Truncate(s string, w int, tail string) string {
|
||||
}
|
||||
var width int
|
||||
pos := len(s)
|
||||
g := graphemes.FromString(s)
|
||||
for g.Next() {
|
||||
g := graphemes.FromString(clusterText(s))
|
||||
for g.Next() && g.Start() < len(s) {
|
||||
chWidth := c.graphemeWidth(g.Value())
|
||||
if width+chWidth > w {
|
||||
pos = g.Start()
|
||||
@@ -651,8 +716,8 @@ func (c *Condition) TruncateLeft(s string, w int, prefix string) string {
|
||||
var width int
|
||||
pos := len(s)
|
||||
|
||||
g := graphemes.FromString(s)
|
||||
for g.Next() {
|
||||
g := graphemes.FromString(clusterText(s))
|
||||
for g.Next() && g.Start() < len(s) {
|
||||
chWidth := c.graphemeWidth(g.Value())
|
||||
|
||||
if width+chWidth > w {
|
||||
@@ -714,8 +779,8 @@ func (c *Condition) TruncatePrefix(s string, w int, prefix string) string {
|
||||
}
|
||||
var width int
|
||||
var pos int
|
||||
g := graphemes.FromString(s)
|
||||
for g.Next() {
|
||||
g := graphemes.FromString(clusterText(s))
|
||||
for g.Next() && g.Start() < len(s) {
|
||||
chWidth := c.graphemeWidth(g.Value())
|
||||
if sw-(width+chWidth) <= w {
|
||||
pos = g.End()
|
||||
@@ -791,6 +856,14 @@ func (c *Condition) Wrap(s string, w int) string {
|
||||
width = 0
|
||||
continue
|
||||
}
|
||||
// CRLF is one cluster that ends the line, as on the
|
||||
// segmenter, so it is never broken before.
|
||||
if b == '\r' && i+1 < len(s) && s[i+1] == '\n' {
|
||||
out.WriteString("\r\n")
|
||||
width = 0
|
||||
i++
|
||||
continue
|
||||
}
|
||||
// Same rule as the StringWidth fast path: no ASCII byte is
|
||||
// wide or ambiguous, so the flags in c cannot change this.
|
||||
cw := 0
|
||||
@@ -815,8 +888,8 @@ func (c *Condition) Wrap(s string, w int) string {
|
||||
width := 0
|
||||
var out strings.Builder
|
||||
out.Grow(len(s) + len(s)/max(w, 1) + 1)
|
||||
g := graphemes.FromString(s)
|
||||
for g.Next() {
|
||||
g := graphemes.FromString(clusterText(s))
|
||||
for g.Next() && g.Start() < len(s) {
|
||||
cluster := g.Value()
|
||||
// LF and CRLF are each a single cluster
|
||||
if strings.HasSuffix(cluster, "\n") {
|
||||
@@ -862,8 +935,13 @@ func RuneWidth(r rune) int {
|
||||
}
|
||||
|
||||
// IsAmbiguousWidth returns whether is ambiguous width or not.
|
||||
//
|
||||
// NOTE: The Latin letters of U+0080..U+017F that Unicode gives ambiguous
|
||||
// width (ü, é, ß, æ, ø and so on) are reported as ambiguous here, but
|
||||
// RuneWidth measures them as one cell even with EastAsianWidth, since
|
||||
// terminals draw them narrow in CJK locales too.
|
||||
func IsAmbiguousWidth(r rune) bool {
|
||||
return inTable(r, private) || inTable(r, ambiguous)
|
||||
return inTable(r, private) || inTable(r, ambiguous) || inTable(r, ambiguousLatin)
|
||||
}
|
||||
|
||||
// IsCombiningWidth returns whether is combining width or not.
|
||||
|
||||
+35
-8
@@ -14,9 +14,11 @@ func mblen(charset string) int {
|
||||
return 6
|
||||
case "jis":
|
||||
return 8
|
||||
case "euctw", "gb18030":
|
||||
return 4
|
||||
case "eucjp":
|
||||
return 3
|
||||
case "euckr", "euccn", "sjis", "cp932", "cp51932", "cp936", "cp949", "cp950", "big5", "gbk", "gb2312":
|
||||
case "euckr", "euccn", "sjis", "shiftjis", "cp932", "cp51932", "cp936", "cp949", "cp950", "big5", "big5hkscs", "gbk", "gb2312":
|
||||
return 2
|
||||
}
|
||||
return 1
|
||||
@@ -45,9 +47,35 @@ func localeCharset(locale string) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// isCJKLanguage reports whether the language code at the start of locale is
|
||||
// Japanese, Korean or Chinese.
|
||||
func isCJKLanguage(locale string) bool {
|
||||
n := 0
|
||||
for n < len(locale) && locale[n] >= 'a' && locale[n] <= 'z' {
|
||||
n++
|
||||
}
|
||||
switch locale[:n] {
|
||||
case "ja", "ko", "zh":
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// normalizeCharset drops the hyphens and underscores that charset names are
|
||||
// spelled with or without, so that "EUC-JP" and "eucjp" compare equal.
|
||||
func normalizeCharset(charset string) string {
|
||||
return strings.Map(func(r rune) rune {
|
||||
if r == '-' || r == '_' {
|
||||
return -1
|
||||
}
|
||||
return r
|
||||
}, charset)
|
||||
}
|
||||
|
||||
func isEastAsian(locale string) bool {
|
||||
charset := strings.ToLower(locale)
|
||||
if cs := localeCharset(locale); cs != "" {
|
||||
cs := localeCharset(locale)
|
||||
if cs != "" {
|
||||
charset = strings.ToLower(cs)
|
||||
}
|
||||
|
||||
@@ -61,14 +89,13 @@ func isEastAsian(locale string) bool {
|
||||
break
|
||||
}
|
||||
}
|
||||
max := mblen(charset)
|
||||
if max > 1 && (charset[0] != 'u' ||
|
||||
strings.HasPrefix(locale, "ja") ||
|
||||
strings.HasPrefix(locale, "ko") ||
|
||||
strings.HasPrefix(locale, "zh")) {
|
||||
cjk := isCJKLanguage(locale)
|
||||
if cs == "" && cjk {
|
||||
// A CJK locale without a charset, such as "ja_JP" on macOS.
|
||||
return true
|
||||
}
|
||||
return false
|
||||
max := mblen(normalizeCharset(charset))
|
||||
return max > 1 && (charset[0] != 'u' || cjk)
|
||||
}
|
||||
|
||||
// IsEastAsian return true if the current locale is CJK
|
||||
|
||||
+58
-52
@@ -173,65 +173,71 @@ var doublewidth = table{
|
||||
|
||||
var ambiguous = table{
|
||||
{0x00A1, 0x00A1}, {0x00A4, 0x00A4}, {0x00A7, 0x00A8},
|
||||
{0x00AA, 0x00AA}, {0x00AD, 0x00AE}, {0x00B0, 0x00B4},
|
||||
{0x00B6, 0x00BA}, {0x00BC, 0x00BF}, {0x00C6, 0x00C6},
|
||||
{0x00D0, 0x00D0}, {0x00D7, 0x00D8}, {0x00DE, 0x00E1},
|
||||
{0x00AD, 0x00AE}, {0x00B0, 0x00B4}, {0x00B6, 0x00B9},
|
||||
{0x00BC, 0x00BF}, {0x00D7, 0x00D7}, {0x00F7, 0x00F7},
|
||||
{0x01CE, 0x01CE}, {0x01D0, 0x01D0}, {0x01D2, 0x01D2},
|
||||
{0x01D4, 0x01D4}, {0x01D6, 0x01D6}, {0x01D8, 0x01D8},
|
||||
{0x01DA, 0x01DA}, {0x01DC, 0x01DC}, {0x0251, 0x0251},
|
||||
{0x0261, 0x0261}, {0x02C4, 0x02C4}, {0x02C7, 0x02C7},
|
||||
{0x02C9, 0x02CB}, {0x02CD, 0x02CD}, {0x02D0, 0x02D0},
|
||||
{0x02D8, 0x02DB}, {0x02DD, 0x02DD}, {0x02DF, 0x02DF},
|
||||
{0x0300, 0x036F}, {0x0391, 0x03A1}, {0x03A3, 0x03A9},
|
||||
{0x03B1, 0x03C1}, {0x03C3, 0x03C9}, {0x0401, 0x0401},
|
||||
{0x0410, 0x044F}, {0x0451, 0x0451}, {0x2010, 0x2010},
|
||||
{0x2013, 0x2016}, {0x2018, 0x2019}, {0x201C, 0x201D},
|
||||
{0x2020, 0x2022}, {0x2024, 0x2027}, {0x2030, 0x2030},
|
||||
{0x2032, 0x2033}, {0x2035, 0x2035}, {0x203B, 0x203B},
|
||||
{0x203E, 0x203E}, {0x2074, 0x2074}, {0x207F, 0x207F},
|
||||
{0x2081, 0x2084}, {0x20AC, 0x20AC}, {0x2103, 0x2103},
|
||||
{0x2105, 0x2105}, {0x2109, 0x2109}, {0x2113, 0x2113},
|
||||
{0x2116, 0x2116}, {0x2121, 0x2122}, {0x2126, 0x2126},
|
||||
{0x212B, 0x212B}, {0x2153, 0x2154}, {0x215B, 0x215E},
|
||||
{0x2160, 0x216B}, {0x2170, 0x2179}, {0x2189, 0x2189},
|
||||
{0x2190, 0x2199}, {0x21B8, 0x21B9}, {0x21D2, 0x21D2},
|
||||
{0x21D4, 0x21D4}, {0x21E7, 0x21E7}, {0x2200, 0x2200},
|
||||
{0x2202, 0x2203}, {0x2207, 0x2208}, {0x220B, 0x220B},
|
||||
{0x220F, 0x220F}, {0x2211, 0x2211}, {0x2215, 0x2215},
|
||||
{0x221A, 0x221A}, {0x221D, 0x2220}, {0x2223, 0x2223},
|
||||
{0x2225, 0x2225}, {0x2227, 0x222C}, {0x222E, 0x222E},
|
||||
{0x2234, 0x2237}, {0x223C, 0x223D}, {0x2248, 0x2248},
|
||||
{0x224C, 0x224C}, {0x2252, 0x2252}, {0x2260, 0x2261},
|
||||
{0x2264, 0x2267}, {0x226A, 0x226B}, {0x226E, 0x226F},
|
||||
{0x2282, 0x2283}, {0x2286, 0x2287}, {0x2295, 0x2295},
|
||||
{0x2299, 0x2299}, {0x22A5, 0x22A5}, {0x22BF, 0x22BF},
|
||||
{0x2312, 0x2312}, {0x2460, 0x24E9}, {0x24EB, 0x254B},
|
||||
{0x2550, 0x2573}, {0x2580, 0x258F}, {0x2592, 0x2595},
|
||||
{0x25A0, 0x25A1}, {0x25A3, 0x25A9}, {0x25B2, 0x25B3},
|
||||
{0x25B6, 0x25B7}, {0x25BC, 0x25BD}, {0x25C0, 0x25C1},
|
||||
{0x25C6, 0x25C8}, {0x25CB, 0x25CB}, {0x25CE, 0x25D1},
|
||||
{0x25E2, 0x25E5}, {0x25EF, 0x25EF}, {0x2605, 0x2606},
|
||||
{0x2609, 0x2609}, {0x260E, 0x260F}, {0x261C, 0x261C},
|
||||
{0x261E, 0x261E}, {0x2640, 0x2640}, {0x2642, 0x2642},
|
||||
{0x2660, 0x2661}, {0x2663, 0x2665}, {0x2667, 0x266A},
|
||||
{0x266C, 0x266D}, {0x266F, 0x266F}, {0x269E, 0x269F},
|
||||
{0x26BF, 0x26BF}, {0x26C6, 0x26CD}, {0x26CF, 0x26D3},
|
||||
{0x26D5, 0x26E1}, {0x26E3, 0x26E3}, {0x26E8, 0x26E9},
|
||||
{0x26EB, 0x26F1}, {0x26F4, 0x26F4}, {0x26F6, 0x26F9},
|
||||
{0x26FB, 0x26FC}, {0x26FE, 0x26FF}, {0x273D, 0x273D},
|
||||
{0x2776, 0x277F}, {0x2B56, 0x2B59}, {0x3248, 0x324F},
|
||||
{0xE000, 0xF8FF}, {0xFFFD, 0xFFFD}, {0x1F100, 0x1F10A},
|
||||
{0x1F110, 0x1F12D}, {0x1F130, 0x1F169}, {0x1F170, 0x1F18D},
|
||||
{0x1F18F, 0x1F190}, {0x1F19B, 0x1F1AC}, {0xF0000, 0xFFFFD},
|
||||
{0x100000, 0x10FFFD},
|
||||
}
|
||||
|
||||
var ambiguousLatin = table{
|
||||
{0x00AA, 0x00AA}, {0x00BA, 0x00BA}, {0x00C6, 0x00C6},
|
||||
{0x00D0, 0x00D0}, {0x00D8, 0x00D8}, {0x00DE, 0x00E1},
|
||||
{0x00E6, 0x00E6}, {0x00E8, 0x00EA}, {0x00EC, 0x00ED},
|
||||
{0x00F0, 0x00F0}, {0x00F2, 0x00F3}, {0x00F7, 0x00FA},
|
||||
{0x00F0, 0x00F0}, {0x00F2, 0x00F3}, {0x00F8, 0x00FA},
|
||||
{0x00FC, 0x00FC}, {0x00FE, 0x00FE}, {0x0101, 0x0101},
|
||||
{0x0111, 0x0111}, {0x0113, 0x0113}, {0x011B, 0x011B},
|
||||
{0x0126, 0x0127}, {0x012B, 0x012B}, {0x0131, 0x0133},
|
||||
{0x0138, 0x0138}, {0x013F, 0x0142}, {0x0144, 0x0144},
|
||||
{0x0148, 0x014B}, {0x014D, 0x014D}, {0x0152, 0x0153},
|
||||
{0x0166, 0x0167}, {0x016B, 0x016B}, {0x01CE, 0x01CE},
|
||||
{0x01D0, 0x01D0}, {0x01D2, 0x01D2}, {0x01D4, 0x01D4},
|
||||
{0x01D6, 0x01D6}, {0x01D8, 0x01D8}, {0x01DA, 0x01DA},
|
||||
{0x01DC, 0x01DC}, {0x0251, 0x0251}, {0x0261, 0x0261},
|
||||
{0x02C4, 0x02C4}, {0x02C7, 0x02C7}, {0x02C9, 0x02CB},
|
||||
{0x02CD, 0x02CD}, {0x02D0, 0x02D0}, {0x02D8, 0x02DB},
|
||||
{0x02DD, 0x02DD}, {0x02DF, 0x02DF}, {0x0300, 0x036F},
|
||||
{0x0391, 0x03A1}, {0x03A3, 0x03A9}, {0x03B1, 0x03C1},
|
||||
{0x03C3, 0x03C9}, {0x0401, 0x0401}, {0x0410, 0x044F},
|
||||
{0x0451, 0x0451}, {0x2010, 0x2010}, {0x2013, 0x2016},
|
||||
{0x2018, 0x2019}, {0x201C, 0x201D}, {0x2020, 0x2022},
|
||||
{0x2024, 0x2027}, {0x2030, 0x2030}, {0x2032, 0x2033},
|
||||
{0x2035, 0x2035}, {0x203B, 0x203B}, {0x203E, 0x203E},
|
||||
{0x2074, 0x2074}, {0x207F, 0x207F}, {0x2081, 0x2084},
|
||||
{0x20AC, 0x20AC}, {0x2103, 0x2103}, {0x2105, 0x2105},
|
||||
{0x2109, 0x2109}, {0x2113, 0x2113}, {0x2116, 0x2116},
|
||||
{0x2121, 0x2122}, {0x2126, 0x2126}, {0x212B, 0x212B},
|
||||
{0x2153, 0x2154}, {0x215B, 0x215E}, {0x2160, 0x216B},
|
||||
{0x2170, 0x2179}, {0x2189, 0x2189}, {0x2190, 0x2199},
|
||||
{0x21B8, 0x21B9}, {0x21D2, 0x21D2}, {0x21D4, 0x21D4},
|
||||
{0x21E7, 0x21E7}, {0x2200, 0x2200}, {0x2202, 0x2203},
|
||||
{0x2207, 0x2208}, {0x220B, 0x220B}, {0x220F, 0x220F},
|
||||
{0x2211, 0x2211}, {0x2215, 0x2215}, {0x221A, 0x221A},
|
||||
{0x221D, 0x2220}, {0x2223, 0x2223}, {0x2225, 0x2225},
|
||||
{0x2227, 0x222C}, {0x222E, 0x222E}, {0x2234, 0x2237},
|
||||
{0x223C, 0x223D}, {0x2248, 0x2248}, {0x224C, 0x224C},
|
||||
{0x2252, 0x2252}, {0x2260, 0x2261}, {0x2264, 0x2267},
|
||||
{0x226A, 0x226B}, {0x226E, 0x226F}, {0x2282, 0x2283},
|
||||
{0x2286, 0x2287}, {0x2295, 0x2295}, {0x2299, 0x2299},
|
||||
{0x22A5, 0x22A5}, {0x22BF, 0x22BF}, {0x2312, 0x2312},
|
||||
{0x2460, 0x24E9}, {0x24EB, 0x254B}, {0x2550, 0x2573},
|
||||
{0x2580, 0x258F}, {0x2592, 0x2595}, {0x25A0, 0x25A1},
|
||||
{0x25A3, 0x25A9}, {0x25B2, 0x25B3}, {0x25B6, 0x25B7},
|
||||
{0x25BC, 0x25BD}, {0x25C0, 0x25C1}, {0x25C6, 0x25C8},
|
||||
{0x25CB, 0x25CB}, {0x25CE, 0x25D1}, {0x25E2, 0x25E5},
|
||||
{0x25EF, 0x25EF}, {0x2605, 0x2606}, {0x2609, 0x2609},
|
||||
{0x260E, 0x260F}, {0x261C, 0x261C}, {0x261E, 0x261E},
|
||||
{0x2640, 0x2640}, {0x2642, 0x2642}, {0x2660, 0x2661},
|
||||
{0x2663, 0x2665}, {0x2667, 0x266A}, {0x266C, 0x266D},
|
||||
{0x266F, 0x266F}, {0x269E, 0x269F}, {0x26BF, 0x26BF},
|
||||
{0x26C6, 0x26CD}, {0x26CF, 0x26D3}, {0x26D5, 0x26E1},
|
||||
{0x26E3, 0x26E3}, {0x26E8, 0x26E9}, {0x26EB, 0x26F1},
|
||||
{0x26F4, 0x26F4}, {0x26F6, 0x26F9}, {0x26FB, 0x26FC},
|
||||
{0x26FE, 0x26FF}, {0x273D, 0x273D}, {0x2776, 0x277F},
|
||||
{0x2B56, 0x2B59}, {0x3248, 0x324F}, {0xE000, 0xF8FF},
|
||||
{0xFFFD, 0xFFFD}, {0x1F100, 0x1F10A}, {0x1F110, 0x1F12D},
|
||||
{0x1F130, 0x1F169}, {0x1F170, 0x1F18D}, {0x1F18F, 0x1F190},
|
||||
{0x1F19B, 0x1F1AC}, {0xF0000, 0xFFFFD}, {0x100000, 0x10FFFD},
|
||||
{0x0166, 0x0167}, {0x016B, 0x016B},
|
||||
}
|
||||
|
||||
var narrow = table{
|
||||
{0x0020, 0x007E}, {0x00A2, 0x00A3}, {0x00A5, 0x00A6},
|
||||
{0x00AC, 0x00AC}, {0x00AF, 0x00AF}, {0x27E6, 0x27ED},
|
||||
|
||||
Vendored
+1
-1
@@ -155,7 +155,7 @@ github.com/klauspost/compress/internal/le
|
||||
github.com/klauspost/compress/internal/snapref
|
||||
github.com/klauspost/compress/zstd
|
||||
github.com/klauspost/compress/zstd/internal/xxhash
|
||||
# github.com/mattn/go-runewidth v0.0.30
|
||||
# github.com/mattn/go-runewidth v0.0.31
|
||||
## explicit; go 1.23
|
||||
github.com/mattn/go-runewidth
|
||||
# github.com/moby/docker-image-spec v1.3.1
|
||||
|
||||
Reference in New Issue
Block a user