From 9bce5d19312e51dd4f1e2a65eba8a765650d04b5 Mon Sep 17 00:00:00 2001 From: Bnchi Date: Fri, 18 Oct 2024 16:58:55 +0300 Subject: [PATCH] Don't call prefix straight --- src/construct/partial_mdx_expression.rs | 3 +-- tests/mdx_expression_flow.rs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/construct/partial_mdx_expression.rs b/src/construct/partial_mdx_expression.rs index e9d03105..aeac26ee 100644 --- a/src/construct/partial_mdx_expression.rs +++ b/src/construct/partial_mdx_expression.rs @@ -56,7 +56,6 @@ //! [mdx_expression_text]: crate::construct::mdx_expression_text //! [interleaving]: https://mdxjs.com/docs/what-is-mdx/#interleaving -use crate::construct::partial_space_or_tab::space_or_tab_min_max; use crate::event::Name; use crate::message; use crate::state::{Name as StateName, State}; @@ -202,7 +201,7 @@ pub fn eol_after(tokenizer: &mut Tokenizer) -> State { // For future lines, we’d move at most to // `line_start_shifted.column + 4`. tokenizer.enter(Name::LinePrefix); - prefix(tokenizer) + return State::Retry(StateName::MdxExpressionPrefix); } else { State::Retry(StateName::MdxExpressionBefore) } diff --git a/tests/mdx_expression_flow.rs b/tests/mdx_expression_flow.rs index af4df0fd..e0b6a5a4 100644 --- a/tests/mdx_expression_flow.rs +++ b/tests/mdx_expression_flow.rs @@ -1,6 +1,6 @@ mod test_utils; use markdown::{ - mdast::{MdxFlowExpression, MdxTextExpression, Node, Paragraph, Root, Text}, + mdast::{MdxFlowExpression, Node, Root}, message, to_html_with_options, to_mdast, unist::Position, Constructs, Options, ParseOptions,