fixup! 37267afca9bb0d048643ae663ec4a9855ce2fff0

This commit is contained in:
Noah Hellman 2022-12-02 08:16:47 +01:00
parent 4aed9fa8e0
commit 61dfa91db3
2 changed files with 18 additions and 1 deletions

View file

@ -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 {

View file

@ -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;