diff --git a/src/inline.rs b/src/inline.rs index 9bfa87b..721bdd3 100644 --- a/src/inline.rs +++ b/src/inline.rs @@ -58,7 +58,7 @@ pub enum EventKind { Str, Whitespace, Attributes, - AttributesDummy, + Placeholder, } #[derive(Debug, PartialEq, Eq)] @@ -372,10 +372,9 @@ impl + Clone> Parser { }) .unwrap_or_else(|| { self.openers.push((delim, self.events.len())); - // push dummy attributes in case attributes are encountered after closing - // delimiter + // push dummy event in case attributes are encountered after closing delimiter self.events.push_back(Event { - kind: EventKind::AttributesDummy, + kind: EventKind::Placeholder, span: Span::empty_at(self.span.start()), }); // use str for now, replace if closed later @@ -562,7 +561,7 @@ impl + Clone> Iterator for Parser { while self.events.front().map_or(false, |e| { matches!( e.kind, - EventKind::Str | EventKind::Whitespace | EventKind::AttributesDummy + EventKind::Str | EventKind::Whitespace | EventKind::Placeholder ) }) { let ev = self.events.pop_front().unwrap(); @@ -574,7 +573,7 @@ impl + Clone> Iterator for Parser { span, }) } - EventKind::AttributesDummy => self.next(), + EventKind::Placeholder => self.next(), _ => Some(e), } }) diff --git a/src/lib.rs b/src/lib.rs index 6a985af..1bc2185 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -359,7 +359,7 @@ impl<'s> Parser<'s> { inline::EventKind::Str => Event::Str(self.inlines.src(inline.span)), inline::EventKind::Whitespace | inline::EventKind::Attributes - | inline::EventKind::AttributesDummy => { + | inline::EventKind::Placeholder => { panic!("{:?}", inline) } })