From 61dfa91db3bed1dda221570ef9ff556be5a75518 Mon Sep 17 00:00:00 2001 From: Noah Hellman Date: Fri, 2 Dec 2022 08:16:47 +0100 Subject: [PATCH] fixup! 37267afca9bb0d048643ae663ec4a9855ce2fff0 --- src/block.rs | 18 ++++++++++++++++++ src/lib.rs | 1 - 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/block.rs b/src/block.rs index 8c310ea..3f9f87a 100644 --- a/src/block.rs +++ b/src/block.rs @@ -429,6 +429,24 @@ mod test { (Element(Inline), " l1"), (Exit(Leaf(CodeBlock { fence_length: 4 })), "````"), ); + test_parse!( + concat!( + "```\n", // + "a\n", // + "```\n", // + "```\n", // + "bbb\n", // + "```\n", // + ), + (Enter(Leaf(CodeBlock { fence_length: 3 })), "```"), + (Element(Inline), ""), + (Element(Inline), "a\n"), + (Exit(Leaf(CodeBlock { fence_length: 3 })), "```"), + (Enter(Leaf(CodeBlock { fence_length: 3 })), "```"), + (Element(Inline), ""), + (Element(Inline), "bbb\n"), + (Exit(Leaf(CodeBlock { fence_length: 3 })), "```"), + ); } macro_rules! test_block { diff --git a/src/lib.rs b/src/lib.rs index 8e18a24..177fc59 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -341,7 +341,6 @@ impl<'s> Iterator for Parser<'s> { tree::EventKind::Element(atom) => { assert_eq!(atom, block::Atom::Inline); parser.parse(ev.span.of(self.src)); - self.inline_start = ev.span.start(); } tree::EventKind::Exit(block) => { self.parser = None;