@@ -472,6 +472,9 @@ flatten outer
472472 -- them and they will be readable and parsable
473473 (Quoted _ _, _) -> keep f i
474474 (_, Quoted _ _) -> keep f i
475+ -- spans are not rendered using RST inlines, so we can keep them
476+ (Span _ _, _) -> keep f i
477+ (_, Span _ _) -> keep f i
475478 -- inlineToRST handles this case properly so it's safe to keep
476479 (Link _ _ _, Image _ _ _) -> keep f i
477480 -- parent inlines would prevent links from being correctly