From f5437632f486b7d0a0a181c58f113c86d032b02c Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 24 Apr 2017 20:11:36 -0400 Subject: Upgrading server dependancies (#6215) --- vendor/golang.org/x/text/unicode/norm/normalize.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'vendor/golang.org/x/text/unicode/norm/normalize.go') diff --git a/vendor/golang.org/x/text/unicode/norm/normalize.go b/vendor/golang.org/x/text/unicode/norm/normalize.go index d3f206936..e28ac641a 100644 --- a/vendor/golang.org/x/text/unicode/norm/normalize.go +++ b/vendor/golang.org/x/text/unicode/norm/normalize.go @@ -324,7 +324,6 @@ func (f *formInfo) quickSpan(src input, i, end int, atEOF bool) (n int, ok bool) // have an overflow for runes that are starters (e.g. with U+FF9E). switch ss.next(info) { case ssStarter: - ss.first(info) lastSegStart = i case ssOverflow: return lastSegStart, false @@ -441,6 +440,8 @@ func (f Form) nextBoundary(src input, nsrc int, atEOF bool) int { } return -1 } + // TODO: Using streamSafe to determine the boundary isn't the same as + // using BoundaryBefore. Determine which should be used. if s := ss.next(info); s != ssSuccess { return i } @@ -505,15 +506,14 @@ func decomposeSegment(rb *reorderBuffer, sp int, atEOF bool) int { if info.size == 0 { return 0 } - if rb.nrune > 0 { - if s := rb.ss.next(info); s == ssStarter { - goto end - } else if s == ssOverflow { - rb.insertCGJ() + if s := rb.ss.next(info); s == ssStarter { + // TODO: this could be removed if we don't support merging. + if rb.nrune > 0 { goto end } - } else { - rb.ss.first(info) + } else if s == ssOverflow { + rb.insertCGJ() + goto end } if err := rb.insertFlush(rb.src, sp, info); err != iSuccess { return int(err) -- cgit v1.2.3-1-g7c22