git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #3970 from d-dorazio/master

markdown writer: always write bracketed_spans' attributes

commiteb508c1330c631330463b95f4034a8dcd300a641 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 13 Oct 2017, 14:02 (9 years ago) parent6934b928dd8f49
1 file changed+4−2
src/Text/Pandoc/Writers/Markdown.hs+4−2
src/Text/Pandoc/Writers/Markdown.hs+4−2
@@ -952,8 +952,10 @@ inlineToMarkdown opts (Span attrs ils) = do
952952 True -> contents
953953 False | attrs == nullAttr -> contents
954954 | isEnabled Ext_bracketed_spans opts ->
955− "[" <> contents <> "]" <>
956− linkAttributes opts attrs
955+ let attrs' = if attrs /= nullAttr
956+ then attrsToMarkdown attrs
957+ else empty
958+ in "[" <> contents <> "]" <> attrs'
957959 | isEnabled Ext_raw_html opts ||
958960 isEnabled Ext_native_spans opts ->
959961 tagWithAttrs "span" attrs <> contents <> text "</span>"