File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -446,7 +446,7 @@ class Parser {
446446 if ( op == " <" ) {
447447 var start = tokenMax + 1 ;
448448 var ident = getIdent ();
449- if ( tokens .length != 0 )
449+ if ( #if hscriptPos tokens .length != 0 #else ! tokens . isEmpty () #end )
450450 throw " assert" ;
451451 if ( tokenMin == start ) {
452452 var endTag = " </" + ident + " >" ;
@@ -458,9 +458,13 @@ class Parser {
458458 if ( end >= 0 ) {
459459 readPos = end + endTag .length ;
460460 char = - 1 ;
461- tokenMin = start - 1 ;
462- tokenMax = readPos + offset - 1 ;
463- var str = input .substr (tokenMin - offset ,tokenMax - tokenMin + 1 );
461+ start -- ;
462+ var end = readPos + offset - 1 ;
463+ #if hscriptPos
464+ tokenMin = start ;
465+ tokenMax = end ;
466+ #end
467+ var str = input .substr (start - offset ,end - tokenMin + 1 );
464468 return mk (EMeta (" :markup" ,[],mk (EConst (CString (str )))));
465469 }
466470 }
You can’t perform that action at this time.
0 commit comments