git.iko.soy/typeable/pandoc
on master help sign in
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.

commit1c4d14cdcc60c1bfcc579a5b5ab154e8e62e54c7 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 18 Jan 2021, 11:32 (6 years ago) parentc841bcf
1 file changed+2−2
src/Text/Pandoc/Writers/RST.hs+2−2
src/Text/Pandoc/Writers/RST.hs+2−2
@@ -519,8 +519,8 @@ flatten outer
519519 (Quoted _ _, _) -> keep f i
520520 (_, Quoted _ _) -> keep f i
521521 -- spans are not rendered using RST inlines, so we can keep them
522− (Span ("",[],[]) _, _) -> keep f i
523− (_, Span ("",[],[]) _) -> keep f i
522+ (Span (_,_,[]) _, _) -> keep f i
523+ (_, Span (_,_,[]) _) -> keep f i
524524 -- inlineToRST handles this case properly so it's safe to keep
525525 ( Link{}, Image{}) -> keep f i
526526 -- parent inlines would prevent links from being correctly