@@ -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>"