diff --git a/src/inline.rs b/src/inline.rs index 81e01ff..058a989 100644 --- a/src/inline.rs +++ b/src/inline.rs @@ -404,6 +404,10 @@ impl + Clone> Parser { let (d, e) = self.openers[o]; let e_attr = e; let e_opener = e + 1; + if e_opener == self.events.len() - 1 { + // empty container + return None; + } let inner_span = Span::new(self.events[e_opener].span.end(), self.span.start()); let mut event_closer = match Container::try_from(d) { Ok(cont) => {