git.iko.soy/typeable/pandoc
on master help sign in
RST writer: treat Span as transparent.

Previously an Emph inside a Span was being treated as nested markup and ignored. With this patch, the Span is just ignored. Closes #5446.

commite409509a681ee75c6d3eec0b913d40c26aeaabb2 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 15 Apr 2019, 09:48 (8 years ago) parent6d19c08
2 files changed+9
src/Text/Pandoc/Writers/RST.hs+3 test/command/5446.md+6
src/Text/Pandoc/Writers/RST.hs+3
@@ -472,6 +472,9 @@ flatten outer
472472 -- them and they will be readable and parsable
473473 (Quoted _ _, _) -> keep f i
474474 (_, 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
475478 -- inlineToRST handles this case properly so it's safe to keep
476479 (Link _ _ _, Image _ _ _) -> keep f i
477480 -- parent inlines would prevent links from being correctly
test/command/5446.mdnew file+6
@@ -0,0 +1,6 @@
1+```
2+% pandoc -f latex -t rst
3+{\em test test \/}
4+^D
5+*test test*
6+```