rm unused var

This commit is contained in:
Noah Hellman 2023-01-15 16:21:05 +01:00
parent 0816ab4dcb
commit b0565eb4c6

View file

@ -260,7 +260,6 @@ pub struct Parser<'s> {
tree: block::Tree, tree: block::Tree,
inlines: span::InlineSpans<'s>, inlines: span::InlineSpans<'s>,
inline_parser: Option<inline::Parser<span::InlineCharsIter<'s>>>, inline_parser: Option<inline::Parser<span::InlineCharsIter<'s>>>,
inline_start: usize,
} }
impl<'s> Parser<'s> { impl<'s> Parser<'s> {
@ -271,7 +270,6 @@ impl<'s> Parser<'s> {
tree: block::parse(src), tree: block::parse(src),
inlines: span::InlineSpans::new(src), inlines: span::InlineSpans::new(src),
inline_parser: None, inline_parser: None,
inline_start: 0,
} }
} }
} }
@ -375,14 +373,10 @@ impl<'s> Parser<'s> {
block::Node::Leaf(l) => { block::Node::Leaf(l) => {
self.inlines.set_spans(self.tree.inlines()); self.inlines.set_spans(self.tree.inlines());
self.inline_parser = Some(inline::Parser::new(self.inlines.chars())); self.inline_parser = Some(inline::Parser::new(self.inlines.chars()));
self.inline_start = ev.span.end();
let container = match l { let container = match l {
block::Leaf::CodeBlock { .. } => { block::Leaf::CodeBlock { .. } => Container::CodeBlock {
self.inline_start += 1; // skip newline
Container::CodeBlock {
lang: (!ev.span.is_empty()).then(|| content), lang: (!ev.span.is_empty()).then(|| content),
} },
}
_ => Container::from_leaf_block(content, l), _ => Container::from_leaf_block(content, l),
}; };
Event::Start(container, attributes) Event::Start(container, attributes)