fixup! block attributes

This commit is contained in:
Noah Hellman 2023-01-12 17:28:21 +01:00
parent c0183d4524
commit 666e9cfd40
2 changed files with 5 additions and 8 deletions

View file

@ -710,7 +710,7 @@ mod test {
}
#[test]
fn typeset_basic() {
fn container_basic() {
test_parse!(
"_abc_",
(Enter(Emphasis), "_"),
@ -726,7 +726,7 @@ mod test {
}
#[test]
fn typeset_nest() {
fn container_nest() {
test_parse!(
"{_{_abc_}_}",
(Enter(Emphasis), "{_"),
@ -746,12 +746,12 @@ mod test {
}
#[test]
fn typeset_unopened() {
fn container_unopened() {
test_parse!("*}abc", (Str, "*}abc"));
}
#[test]
fn typeset_close_parent() {
fn container_close_parent() {
test_parse!(
"{*{_abc*}",
(Enter(Strong), "{*"),
@ -761,7 +761,7 @@ mod test {
}
#[test]
fn typeset_close_block() {
fn container_close_block() {
test_parse!("{_abc", (Str, "{_abc"));
test_parse!("{_{*{_abc", (Str, "{_{*{_abc"));
}

View file

@ -352,7 +352,6 @@ impl<'s> InlineSpans<'s> {
}
fn set_spans(&mut self, spans: impl Iterator<Item = Span>) {
// avoid allocating new vec if size is sufficient
self.spans.clear();
self.spans.extend(spans);
}
@ -449,7 +448,6 @@ impl<'s> Iterator for Parser<'s> {
fn next(&mut self) -> Option<Self::Item> {
if let Some(parser) = &mut self.inline_parser {
if let Some(inline) = parser.next() {
// SAFETY: cannot set lifetime 's on self due to trait
return Some(self.inline(inline));
}
self.inline_parser = None;
@ -463,7 +461,6 @@ impl<'s> Iterator for Parser<'s> {
block::Atom::ThematicBreak => Event::Atom(Atom::ThematicBreak),
block::Atom::Attributes => {
self.block_attributes.parse(&content);
dbg!(&self.block_attributes);
continue;
}
},