@@ -472,6 +472,9 @@ flatten outer
472 -- them and they will be readable and parsable
472 -- them and they will be readable and parsable
473 (Quoted _ _, _) -> keep f i
473 (Quoted _ _, _) -> keep f i
474 (_, Quoted _ _) -> keep f i
474 (_, 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
475 -- inlineToRST handles this case properly so it's safe to keep
478 -- inlineToRST handles this case properly so it's safe to keep
476 (Link _ _ _, Image _ _ _) -> keep f i
479 (Link _ _ _, Image _ _ _) -> keep f i
477 -- parent inlines would prevent links from being correctly
480 -- parent inlines would prevent links from being correctly