diff --git a/src/inline.rs b/src/inline.rs index 7037e67..998c3b3 100644 --- a/src/inline.rs +++ b/src/inline.rs @@ -584,7 +584,23 @@ impl + Clone> Parser { lex::Kind::Hardbreak => Hardbreak, lex::Kind::Escape => Escape, lex::Kind::Nbsp => Nbsp, - lex::Kind::Seq(lex::Sequence::Period) if first.len == 3 => Ellipsis, + lex::Kind::Seq(lex::Sequence::Period) if first.len >= 3 => { + while self.span.len() > 3 { + self.events.push_back(Event { + kind: EventKind::Atom(Ellipsis), + span: self.span.with_len(3), + }); + self.span = self.span.skip(3); + } + if self.span.len() == 3 { + Ellipsis + } else { + return Some(Event { + kind: EventKind::Str, + span: self.span, + }); + } + } lex::Kind::Seq(lex::Sequence::Hyphen) if first.len == 2 => EnDash, lex::Kind::Seq(lex::Sequence::Hyphen) if first.len == 3 => EmDash, lex::Kind::Open(lex::Delimiter::BraceQuote1) => Quote {