From a4b56e7b971fa81c56a59b465f90c8016f01320d Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 11 Oct 2022 09:54:56 +0200 Subject: Add support for proper positional info in swc tree * Fix some positional info in SWC error messages * Add positional info in `to_document` on duplicate layouts * Add support for `path` on `Program` (`to_swc`, `to_document`, `jsx_rewrite`), for the path of a file on disk * Add support for `development` to `jsx-rewrite`, which when defined will embed info on where tags were written into the runtime code when they are not passed * Refactor to move some utilities to `micromark_swc_utils.rs`, `swc_utils.rs` --- tests/mdx_expression_flow.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/mdx_expression_flow.rs') diff --git a/tests/mdx_expression_flow.rs b/tests/mdx_expression_flow.rs index 0b13149..c9ff560 100644 --- a/tests/mdx_expression_flow.rs +++ b/tests/mdx_expression_flow.rs @@ -94,7 +94,8 @@ fn mdx_expression_flow_agnostic() -> Result<(), String> { Node::Root(Root { children: vec![Node::MdxFlowExpression(MdxFlowExpression { value: "alpha +\nbravo".to_string(), - position: Some(Position::new(1, 1, 0, 2, 7, 15)) + position: Some(Position::new(1, 1, 0, 2, 7, 15)), + stops: vec![(0, 1), (7, 8), (8, 9)] })], position: Some(Position::new(1, 1, 0, 2, 7, 15)) }), -- cgit