diff options
Diffstat (limited to 'vendor')
| -rw-r--r-- | vendor/github.com/tdewolff/parse/v2/html/lex.go | 20 | ||||
| -rw-r--r-- | vendor/modules.txt | 4 |
2 files changed, 12 insertions, 12 deletions
diff --git a/vendor/github.com/tdewolff/parse/v2/html/lex.go b/vendor/github.com/tdewolff/parse/v2/html/lex.go index 8e2719504..4eb50f49d 100644 --- a/vendor/github.com/tdewolff/parse/v2/html/lex.go +++ b/vendor/github.com/tdewolff/parse/v2/html/lex.go @@ -162,7 +162,16 @@ func (l *Lexer) Next() (TokenType, []byte) { for { c = l.r.Peek(0) - if c == '<' { + if 0 < len(l.tmplBegin) && l.at(l.tmplBegin...) { + if 0 < l.r.Pos() { + l.text = l.r.Shift() + return TextToken, l.text + } + l.r.Move(len(l.tmplBegin)) + l.moveTemplate() + l.hasTmpl = true + return TemplateToken, l.r.Shift() + } else if c == '<' { c = l.r.Peek(1) isEndTag := c == '/' && l.r.Peek(2) != '>' && (l.r.Peek(2) != 0 || l.r.PeekErr(2) == nil) if !isEndTag && (c < 'a' || 'z' < c) && (c < 'A' || 'Z' < c) && c != '!' && c != '?' { @@ -190,15 +199,6 @@ func (l *Lexer) Next() (TokenType, []byte) { l.r.Move(1) return CommentToken, l.shiftBogusComment() } - } else if 0 < len(l.tmplBegin) && l.at(l.tmplBegin...) { - if 0 < l.r.Pos() { - l.text = l.r.Shift() - return TextToken, l.text - } - l.r.Move(len(l.tmplBegin)) - l.moveTemplate() - l.hasTmpl = true - return TemplateToken, l.r.Shift() } else if c == 0 && l.r.Err() != nil { if 0 < l.r.Pos() { l.text = l.r.Shift() diff --git a/vendor/modules.txt b/vendor/modules.txt index 2144cf7a5..5da001777 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -819,11 +819,11 @@ github.com/stretchr/testify/suite # github.com/subosito/gotenv v1.6.0 ## explicit; go 1.18 github.com/subosito/gotenv -# github.com/tdewolff/minify/v2 v2.23.0 +# github.com/tdewolff/minify/v2 v2.23.1 ## explicit; go 1.18.0 github.com/tdewolff/minify/v2 github.com/tdewolff/minify/v2/html -# github.com/tdewolff/parse/v2 v2.7.22 +# github.com/tdewolff/parse/v2 v2.7.23 ## explicit; go 1.13 github.com/tdewolff/parse/v2 github.com/tdewolff/parse/v2/buffer |
