RST writer: fix #7039.

We were losing content from inside spans with a class,
due to logic that is meant to avoid nested inline
structures that can't be represented in RST.

The logic was a bit stricter than necessary.  This
commit fixes the issue.
This commit is contained in:
John MacFarlane 2021-01-18 11:32:02 -08:00
parent c841bcf3b0
commit 1c4d14cdcc

View file

@ -519,8 +519,8 @@ flatten outer
(Quoted _ _, _) -> keep f i
(_, Quoted _ _) -> keep f i
-- spans are not rendered using RST inlines, so we can keep them
(Span ("",[],[]) _, _) -> keep f i
(_, Span ("",[],[]) _) -> keep f i
(Span (_,_,[]) _, _) -> keep f i
(_, Span (_,_,[]) _) -> keep f i
-- inlineToRST handles this case properly so it's safe to keep
( Link{}, Image{}) -> keep f i
-- parent inlines would prevent links from being correctly