aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-10-13 14:02:01 -0400
committerGitHub <noreply@github.com>2017-10-13 14:02:01 -0400
commiteb508c1330c631330463b95f4034a8dcd300a641 (patch)
tree3c03a2cca35a7f58c0dba18b8ceca8f8ccdc69c7 /src/Text/Pandoc
parent6934b921b35950d0a86a966ed3aff7ba1b660ca6 (diff)
parent8dd8f492c16aa87f074ff3229941007be77e46c2 (diff)
downloadpandoc-eb508c1330c631330463b95f4034a8dcd300a641.tar.gz
Merge pull request #3970 from d-dorazio/master
markdown writer: always write bracketed_spans' attributes
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs6
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>"