diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-10-13 14:02:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-13 14:02:01 -0400 |
commit | eb508c1330c631330463b95f4034a8dcd300a641 (patch) | |
tree | 3c03a2cca35a7f58c0dba18b8ceca8f8ccdc69c7 | |
parent | 6934b921b35950d0a86a966ed3aff7ba1b660ca6 (diff) | |
parent | 8dd8f492c16aa87f074ff3229941007be77e46c2 (diff) | |
download | pandoc-eb508c1330c631330463b95f4034a8dcd300a641.tar.gz |
Merge pull request #3970 from d-dorazio/master
markdown writer: always write bracketed_spans' attributes
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 0221ba6ef..a54f4eb85 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -952,8 +952,10 @@ inlineToMarkdown opts (Span attrs ils) = do True -> contents False | attrs == nullAttr -> contents | isEnabled Ext_bracketed_spans opts -> - "[" <> contents <> "]" <> - linkAttributes opts attrs + let attrs' = if attrs /= nullAttr + then attrsToMarkdown attrs + else empty + in "[" <> contents <> "]" <> attrs' | isEnabled Ext_raw_html opts || isEnabled Ext_native_spans opts -> tagWithAttrs "span" attrs <> contents <> text "</span>" |