diff options
Diffstat (limited to '')
-rw-r--r-- | src/construct/mdx_expression_flow.rs | 2 | ||||
-rw-r--r-- | tests/mdx_expression_flow.rs | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/construct/mdx_expression_flow.rs b/src/construct/mdx_expression_flow.rs index ef3ca41..bfb73de 100644 --- a/src/construct/mdx_expression_flow.rs +++ b/src/construct/mdx_expression_flow.rs @@ -49,7 +49,6 @@ use crate::util::constant::TAB_SIZE; pub fn start(tokenizer: &mut Tokenizer) -> State { if tokenizer.parse_state.options.constructs.mdx_expression_flow { tokenizer.tokenize_state.token_1 = Name::MdxFlowExpression; - tokenizer.concrete = true; if matches!(tokenizer.current, Some(b'\t' | b' ')) { tokenizer.attempt(State::Next(StateName::MdxExpressionFlowBefore), State::Nok); State::Retry(space_or_tab_min_max( @@ -77,6 +76,7 @@ pub fn start(tokenizer: &mut Tokenizer) -> State { /// ``` pub fn before(tokenizer: &mut Tokenizer) -> State { if Some(b'{') == tokenizer.current { + tokenizer.concrete = true; tokenizer.attempt(State::Next(StateName::MdxExpressionFlowAfter), State::Nok); State::Retry(StateName::MdxExpressionStart) } else { diff --git a/tests/mdx_expression_flow.rs b/tests/mdx_expression_flow.rs index 4281e5d..559e08c 100644 --- a/tests/mdx_expression_flow.rs +++ b/tests/mdx_expression_flow.rs @@ -96,6 +96,12 @@ fn mdx_expression_flow_agnostic() -> Result<(), String> { ); assert_eq!( + to_html_with_options("a\n\n* b", &mdx)?, + "<p>a</p>\n<ul>\n<li>b</li>\n</ul>", + "should support lists after non-expressions (GH-11)" + ); + + assert_eq!( to_html_with_options("> {a\nb}", &mdx) .err() .unwrap(), |