aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/RST.hs3
-rw-r--r--test/command/5446.md6
2 files changed, 9 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs
index bf7b35579..c4fd27132 100644
--- a/src/Text/Pandoc/Writers/RST.hs
+++ b/src/Text/Pandoc/Writers/RST.hs
@@ -472,6 +472,9 @@ flatten outer
-- them and they will be readable and parsable
(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
-- inlineToRST handles this case properly so it's safe to keep
(Link _ _ _, Image _ _ _) -> keep f i
-- parent inlines would prevent links from being correctly
diff --git a/test/command/5446.md b/test/command/5446.md
new file mode 100644
index 000000000..5b25c994b
--- /dev/null
+++ b/test/command/5446.md
@@ -0,0 +1,6 @@
+```
+% pandoc -f latex -t rst
+{\em test test \/}
+^D
+*test test*
+```