From 74b600655ded2b62b61c7631f96fc14edd9342fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 14:41:31 +0000 Subject: [chore]: Bump github.com/tdewolff/minify/v2 from 2.20.0 to 2.20.6 (#2337) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- vendor/github.com/tdewolff/minify/v2/html/buffer.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'vendor/github.com/tdewolff/minify/v2/html/buffer.go') diff --git a/vendor/github.com/tdewolff/minify/v2/html/buffer.go b/vendor/github.com/tdewolff/minify/v2/html/buffer.go index f58367b44..f2a6f8c52 100644 --- a/vendor/github.com/tdewolff/minify/v2/html/buffer.go +++ b/vendor/github.com/tdewolff/minify/v2/html/buffer.go @@ -8,12 +8,13 @@ import ( // Token is a single token unit with an attribute value (if given) and hash of the data. type Token struct { html.TokenType - Hash Hash - Data []byte - Text []byte - AttrVal []byte - Traits traits - Offset int + Hash Hash + Data []byte + Text []byte + AttrVal []byte + Traits traits + Offset int + HasTemplate bool } // TokenBuffer is a buffer that allows for token look-ahead. @@ -40,10 +41,11 @@ func (z *TokenBuffer) read(t *Token) { t.Offset = z.r.Offset() t.TokenType, t.Data = z.l.Next() t.Text = z.l.Text() + t.HasTemplate = z.l.HasTemplate() if t.TokenType == html.AttributeToken { t.Offset += 1 + len(t.Text) + 1 t.AttrVal = z.l.AttrVal() - if len(t.AttrVal) > 1 && (t.AttrVal[0] == '"' || t.AttrVal[0] == '\'') { + if 1 < len(t.AttrVal) && (t.AttrVal[0] == '"' || t.AttrVal[0] == '\'') { t.Offset++ t.AttrVal = t.AttrVal[1 : len(t.AttrVal)-1] // quotes will be readded in attribute loop if necessary } -- cgit v1.2.3