Skip to content

Commit

Permalink
🐛 fix wrong comment data (fixes #72) (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed May 14, 2020
1 parent 2df66e4 commit 6c1ac68
Show file tree
Hide file tree
Showing 6 changed files with 1,031 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/html/tokenizer.ts
Expand Up @@ -1493,6 +1493,7 @@ export class Tokenizer {
this.appendTokenValue(HYPHEN_MINUS, "HTMLComment")

if (cp !== HYPHEN_MINUS) {
this.appendTokenValue(HYPHEN_MINUS, "HTMLComment")
return this.reconsumeAs("COMMENT")
}
cp = this.consumeNextCodePoint()
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/ast/comments-2/ast.json
Expand Up @@ -979,7 +979,7 @@
"column": 15
}
},
"value": " - "
"value": " -- "
},
{
"type": "HTMLComment",
Expand Down

0 comments on commit 6c1ac68

Please sign in to comment.