git.iko.soy/typeable/pandoc
on master help sign in
markdown writer: always write bracketed_spans' attributes
commit8dd8f492c16aa87f074ff3229941007be77e46c2 authord-dorazio <daniele.dorazio@adroll.com> dateThu 12 Oct 2017, 23:11 (9 years ago) parent3720005
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>"