diff options
| author | 2025-04-07 11:05:22 +0100 | |
|---|---|---|
| committer | 2025-04-07 11:05:22 +0100 | |
| commit | e0ea77b7306b959525a0d5c015f4c69832ce9f01 (patch) | |
| tree | f2508dbe6fb55b667b7c2a602cd8232fa4025cb1 /vendor/github.com/tdewolff/parse/v2/html/lex.go | |
| parent | [chore]: Bump golang.org/x/crypto from 0.36.0 to 0.37.0 (#3975) (diff) | |
| download | gotosocial-e0ea77b7306b959525a0d5c015f4c69832ce9f01.tar.xz | |
[chore]: Bump github.com/tdewolff/minify/v2 from 2.22.4 to 2.23.0 (#3974)
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.22.4 to 2.23.0.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.22.4...v2.23.0)
---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
dependency-version: 2.23.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/tdewolff/parse/v2/html/lex.go')
| -rw-r--r-- | vendor/github.com/tdewolff/parse/v2/html/lex.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vendor/github.com/tdewolff/parse/v2/html/lex.go b/vendor/github.com/tdewolff/parse/v2/html/lex.go index 8774ea264..8e2719504 100644 --- a/vendor/github.com/tdewolff/parse/v2/html/lex.go +++ b/vendor/github.com/tdewolff/parse/v2/html/lex.go @@ -23,6 +23,7 @@ const ( TextToken SvgToken MathToken + TemplateToken ) // String returns the string representation of a TokenType. @@ -185,18 +186,19 @@ func (l *Lexer) Next() (TokenType, []byte) { } else if c == '!' { l.r.Move(2) return l.readMarkup() - } else if 0 < len(l.tmplBegin) && l.at(l.tmplBegin...) { - l.r.Move(len(l.tmplBegin)) - l.moveTemplate() - l.hasTmpl = true } else if c == '?' { 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() |
