[chore]: Bump github.com/tdewolff/minify/v2 from 2.20.7 to 2.20.9 (#2416)

Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.20.7 to 2.20.9.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.20.7...v2.20.9)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot]
2023-12-05 11:47:21 +01:00
committed by GitHub
parent bdc43a98da
commit ca1a58182d
5 changed files with 13 additions and 8 deletions

View File

@ -204,6 +204,7 @@ Options:
- `KeepEndTags` preserve all end tags
- `KeepQuotes` preserve quotes around attribute values
- `KeepWhitespace` preserve whitespace between inline tags but still collapse multiple whitespace characters into one
- `TemplateDelims` preserve context within and surrounding the given opening and closing delimiters
After recent benchmarking and profiling it became really fast and minifies pages in the 10ms range, making it viable for on-the-fly minification.

View File

@ -184,6 +184,10 @@ 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()