2
0
Эх сурвалжийг харах

[lexer] leave open-mode on `>` so we don't parse `<div>/>`

Simon Krajewski 6 жил өмнө
parent
commit
b17bac736c

+ 4 - 1
src/syntax/lexer.ml

@@ -580,7 +580,10 @@ and not_xml ctx depth in_open =
 		let depth = if in_open then depth - 1 else depth in
 		let depth = if in_open then depth - 1 else depth in
 		if depth < 0 then lexeme_end lexbuf
 		if depth < 0 then lexeme_end lexbuf
 		else not_xml ctx depth false
 		else not_xml ctx depth false
-	| '<' | '/' | '>' ->
+	| '>' ->
+		store lexbuf;
+		not_xml ctx depth false
+	| '<' | '/' ->
 		store lexbuf;
 		store lexbuf;
 		not_xml ctx depth in_open
 		not_xml ctx depth in_open
 	| Plus (Compl ('<' | '/' | '>' | '\n' | '\r')) ->
 	| Plus (Compl ('<' | '/' | '>' | '\n' | '\r')) ->