summaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/net/html/token.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2022-12-27 08:29:42 +0000
committerLibravatar GitHub <noreply@github.com>2022-12-27 08:29:42 +0000
commitb966d3b15712f645b53bc2396fdd29f4ce706850 (patch)
treeb86d17b6c153fd97d31b12bc581f83778101aa19 /vendor/golang.org/x/net/html/token.go
parent[chore]: Bump codeberg.org/gruf/go-bytesize from 1.0.0 to 1.0.2 (#1285) (diff)
downloadgotosocial-b966d3b15712f645b53bc2396fdd29f4ce706850.tar.xz
[chore]: Bump github.com/gin-gonic/gin from 1.8.1 to 1.8.2 (#1286)
Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.8.1 to 1.8.2. - [Release notes](https://github.com/gin-gonic/gin/releases) - [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md) - [Commits](https://github.com/gin-gonic/gin/compare/v1.8.1...v1.8.2) --- updated-dependencies: - dependency-name: github.com/gin-gonic/gin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/golang.org/x/net/html/token.go')
-rw-r--r--vendor/golang.org/x/net/html/token.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/vendor/golang.org/x/net/html/token.go b/vendor/golang.org/x/net/html/token.go
index be3c75414..ae24a6fdf 100644
--- a/vendor/golang.org/x/net/html/token.go
+++ b/vendor/golang.org/x/net/html/token.go
@@ -605,7 +605,10 @@ func (z *Tokenizer) readComment() {
z.data.end = z.data.start
}
}()
- for dashCount := 2; ; {
+
+ var dashCount int
+ beginning := true
+ for {
c := z.readByte()
if z.err != nil {
// Ignore up to two dashes at EOF.
@@ -620,7 +623,7 @@ func (z *Tokenizer) readComment() {
dashCount++
continue
case '>':
- if dashCount >= 2 {
+ if dashCount >= 2 || beginning {
z.data.end = z.raw.end - len("-->")
return
}
@@ -638,6 +641,7 @@ func (z *Tokenizer) readComment() {
}
}
dashCount = 0
+ beginning = false
}
}