git.iko.soy/typeable/pandoc
on master help sign in
markdown writer: always write bracketed_spans' attributes
8dd8f49d-dorazio
src/Text/Pandoc/Writers/Markdown.hs+4−2
@@ -952,8 +952,10 @@ inlineToMarkdown opts (Span attrs ils) = do
952 True -> contents
952 True -> contents
953 False | attrs == nullAttr -> contents
953 False | attrs == nullAttr -> contents
954 | isEnabled Ext_bracketed_spans opts ->
954 | isEnabled Ext_bracketed_spans opts ->
955+ let attrs' = if attrs /= nullAttr
956+ then attrsToMarkdown attrs
957+ else empty
955− "[" <> contents <> "]" <>
958+ in "[" <> contents <> "]" <> attrs'
956− linkAttributes opts attrs
957 | isEnabled Ext_raw_html opts ||
959 | isEnabled Ext_raw_html opts ||
958 isEnabled Ext_native_spans opts ->
960 isEnabled Ext_native_spans opts ->
959 tagWithAttrs "span" attrs <> contents <> text "</span>"
961 tagWithAttrs "span" attrs <> contents <> text "</span>"