From f031a1f239ee8e02036bcb1b7a9022941c9526e7 Mon Sep 17 00:00:00 2001 From: gobwas Date: Thu, 25 Feb 2016 00:31:37 +0300 Subject: [PATCH] bugfix --- lexer.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lexer.go b/lexer.go index 306e856..0ebf451 100644 --- a/lexer.go +++ b/lexer.go @@ -142,7 +142,7 @@ func newLexer(source string) *lexer { l := &lexer{ input: source, state: lexText, - items: make(chan item, 5), + items: make(chan item, len(source)), termPhrases: make(map[int]int), } return l @@ -299,9 +299,7 @@ func lexText(l *lexer) stateFn { l.unread() l.emitMaybe(item_text) return lexSeparator - } - } if l.pos > l.start {