From 4b52fb08328cacd0b916f394569f213cbd473573 Mon Sep 17 00:00:00 2001 From: Noah Hellman Date: Mon, 30 Jan 2023 23:26:35 +0100 Subject: [PATCH] fixup! inline fixup --- src/inline.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/inline.rs b/src/inline.rs index 6225a3f..02587db 100644 --- a/src/inline.rs +++ b/src/inline.rs @@ -441,13 +441,14 @@ impl + Clone> Parser { self.openers.drain(o..); if let Some(event_closer) = &mut event_closer { - if event_closer.span.is_empty() { - assert!(matches!( + if event_closer.span.is_empty() + && matches!( event_closer.kind, EventKind::Exit( Container::ReferenceLink | Container::ReferenceImage ) - )); + ) + { assert_eq!(self.events[e_opener].span, event_closer.span); event_closer.span = inner_span; self.events[e_opener].span = inner_span;