aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-01-18 11:32:02 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2021-01-18 11:32:02 -0800
commit1c4d14cdcc60c1bfcc579a5b5ab154e8e62e54c7 (patch)
treefc7e97bc6a58bd0652cbd64102498bd6d3c20518 /src/Text/Pandoc
parentc841bcf3b01548b2f9b462b39d8edda4c10be534 (diff)
downloadpandoc-1c4d14cdcc60c1bfcc579a5b5ab154e8e62e54c7.tar.gz
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.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/RST.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs
index a3be1d723..d01e13db4 100644
--- a/src/Text/Pandoc/Writers/RST.hs
+++ b/src/Text/Pandoc/Writers/RST.hs
@@ -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