@@ -104,9 +104,9 @@ function checkModes() {
104104 var str = blockComment . start + " " + blockComment . end ;
105105 str = blockComment . start + str ;
106106 if ( blockComment . nestable )
107- str += blockComment . end ;
107+ str += blockComment . end ;
108108 var data = tokenizer . getLineTokens ( str , "start" ) ;
109- var isBroken = data . tokens . some ( function ( t ) { return ! / c o m m e n t / . test ( t . type ) ; } ) ;
109+ var isBroken = data . tokens . some ( function ( t ) { return ! / c o m m e n t | e m p t y / . test ( t . type ) ; } ) ;
110110 if ( isBroken ) {
111111 die ( "broken blockComment in " + modeName , data ) ;
112112 }
@@ -224,7 +224,9 @@ function generateTestData(names, force) {
224224 var tokenizedLine = "" ;
225225 data . tokens . forEach ( function ( x ) {
226226 tokenizedLine += x . value ;
227- tmp . push ( JSON . stringify ( [ x . type , x . value ] ) ) ;
227+ if ( x . type != "empty" ) {
228+ tmp . push ( JSON . stringify ( [ x . type , x . value ] ) ) ;
229+ }
228230 } ) ;
229231 if ( tokenizedLine != line )
230232 tmp . push ( JSON . stringify ( line ) ) ;
@@ -278,6 +280,7 @@ function testMode(modeName, i) {
278280 line = lineData . values . join ( "" ) ;
279281
280282 var tokens = tokenizer . getLineTokens ( line , state ) ;
283+ tokens . tokens = tokens . tokens . filter ( ( el ) => el . type != "empty" ) ;
281284 var values = tokens . tokens . map ( function ( x ) { return x . value ; } ) ;
282285 var types = tokens . tokens . map ( function ( x ) { return x . type ; } ) ;
283286
0 commit comments