Skip to content

Commit

Permalink
Markdown Writer: put space before refLinks, fixes jgm#3630
Browse files Browse the repository at this point in the history
  • Loading branch information
mb21 committed May 2, 2017
1 parent cd2551c commit 944edb9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Text/Pandoc/Writers/Markdown.hs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ keyToMarkdown opts (label', (src, tit), attr) = do
else space <> "\"" <> text tit <> "\""
return $ nest 2 $ hang 2
("[" <> label' <> "]:" <> space) (text src <> tit')
<> linkAttributes opts attr
<+> linkAttributes opts attr

-- | Return markdown representation of notes.
notesToMarkdown :: PandocMonad m => WriterOptions -> [[Block]] -> MD m Doc
Expand Down
8 changes: 8 additions & 0 deletions test/command/3630.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
```
% pandoc -f markdown -t markdown --reference-links
![foo](bar.png){#myId}
^D
![foo]
[foo]: bar.png {#myId}
```

0 comments on commit 944edb9

Please sign in to comment.