From 0dcb53a73cd11530caee713a46d95ac9867b2805 Mon Sep 17 00:00:00 2001 From: Jonathan Hedley Date: Sat, 14 Aug 2021 17:53:15 +1000 Subject: [PATCH] Correctly consume to exit state --- src/main/java/org/jsoup/parser/TokeniserState.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/jsoup/parser/TokeniserState.java b/src/main/java/org/jsoup/parser/TokeniserState.java index 45b8aab6b6..2907ad59fc 100644 --- a/src/main/java/org/jsoup/parser/TokeniserState.java +++ b/src/main/java/org/jsoup/parser/TokeniserState.java @@ -911,6 +911,7 @@ void read(Tokeniser t, CharacterReader r) { // todo: replace nullChar with replaceChar char next = r.current(); if (next == '>' || next == eof) { + r.consume(); t.emitCommentPending(); t.transition(Data); }