File tree 2 files changed +7
-2
lines changed 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -16,5 +16,6 @@ module.exports = {
16
16
malformedComment : 'malformed-comment' ,
17
17
eofInScriptHtmlComment : 'eof-in-script-html-comment' ,
18
18
nestedComment : 'nested-comment' ,
19
- abruptComment : 'abrupt-comment'
19
+ abruptComment : 'abrupt-comment' ,
20
+ eofInComment : 'eof-in-comment'
20
21
} ;
Original file line number Diff line number Diff line change @@ -1601,6 +1601,7 @@ _[COMMENT_START_DASH_STATE] = function commentStartDashState(cp) {
1601
1601
}
1602
1602
1603
1603
else if ( cp === $ . EOF ) {
1604
+ this . _err ( ERR . eofInComment ) ;
1604
1605
this . _emitCurrentToken ( ) ;
1605
1606
this . _emitEOFToken ( ) ;
1606
1607
}
@@ -1623,10 +1624,13 @@ _[COMMENT_STATE] = function commentState(cp) {
1623
1624
this . state = COMMENT_LESS_THAN_SIGN_STATE ;
1624
1625
}
1625
1626
1626
- else if ( cp === $ . NULL )
1627
+ else if ( cp === $ . NULL ) {
1628
+ this . _err ( ERR . unexpectedNullCharacter ) ;
1627
1629
this . currentToken . data += UNICODE . REPLACEMENT_CHARACTER ;
1630
+ }
1628
1631
1629
1632
else if ( cp === $ . EOF ) {
1633
+ this . _err ( ERR . eofInComment ) ;
1630
1634
this . _emitCurrentToken ( ) ;
1631
1635
this . _emitEOFToken ( ) ;
1632
1636
}
You can’t perform that action at this time.
0 commit comments