Przeglądaj źródła

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

Simon Krajewski 6 lat temu
rodzic
commit
b17bac736c
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      src/syntax/lexer.ml

+ 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
 		if depth < 0 then lexeme_end lexbuf
 		else not_xml ctx depth false
-	| '<' | '/' | '>' ->
+	| '>' ->
+		store lexbuf;
+		not_xml ctx depth false
+	| '<' | '/' ->
 		store lexbuf;
 		not_xml ctx depth in_open
 	| Plus (Compl ('<' | '/' | '>' | '\n' | '\r')) ->