Prechádzať zdrojové kódy

Revert "[lexer] don't lose `in_open` status"

This reverts commit 67698ab5adcced3fc392a7e40c1dada0a0ac6880.
Simon Krajewski 6 rokov pred
rodič
commit
cb1f031851

+ 2 - 2
src/syntax/lexer.ml

@@ -563,13 +563,13 @@ and not_xml ctx depth in_open =
 			if depth = 0 then lexeme_end lexbuf
 			else not_xml ctx (depth - 1) false
 		end else
-			not_xml ctx depth in_open
+			not_xml ctx depth false
 	(* opening tag *)
 	| '<',xml_name ->
 		let s = lexeme lexbuf in
 		Buffer.add_string buf s;
 		(* If it matches our document open tag, increase depth and set in_open to true. *)
-		let depth,in_open = if s = ctx.open_tag then depth + 1,true else depth,in_open in
+		let depth,in_open = if s = ctx.open_tag then depth + 1,true else depth,false in
 		not_xml ctx depth in_open
 	(* /> *)
 	| '/','>' ->

+ 0 - 4
tests/unit/src/unitstd/InlineXml.unit.hx

@@ -23,10 +23,6 @@ unit.HelperMacros.pipeMarkupLiteral(<foo.Bar_barf3-gnieh:blargh></foo.Bar_barf3-
 unit.HelperMacros.pipeMarkupLiteral(<></>) == "<></>";
 unit.HelperMacros.pipeMarkupLiteral(<>abc</>) == "<>abc</>";
 
-// more tags in open
-
-unit.HelperMacros.pipeMarkupLiteral(<some-component header=${unit.HelperMacros.pipeMarkupLiteral(<div>Test</div>)} />) == "<some-component header=<div>Test</div> />";
-
 // No check for string literal balancing
 unit.HelperMacros.pipeMarkupLiteral(<xml a=" </xml>) == "<xml a=\" </xml>";
 unit.HelperMacros.pipeMarkupLiteral(<xml a=' </xml>) == "<xml a=' </xml>";