parser/pageparser: Use []byte in page lexer

See #5324
This commit is contained in:
Bjørn Erik Pedersen
2018-10-18 09:04:48 +02:00
parent 2fdc4a24d5
commit 27f5a906a2
4 changed files with 115 additions and 103 deletions

View File

@@ -18,7 +18,7 @@ import "fmt"
type Item struct {
typ itemType
pos pos
Val string
Val []byte
}
func (i Item) IsText() bool {
@@ -70,7 +70,7 @@ func (i Item) String() string {
case i.typ == tEOF:
return "EOF"
case i.typ == tError:
return i.Val
return string(i.Val)
case i.typ > tKeywordMarker:
return fmt.Sprintf("<%s>", i.Val)
case len(i.Val) > 50: