git.iko.soy/typeable/pandoc
on master help sign in
Markdown Writer: put space before reference link definitions

Fixes #3630 (#3631). Previously the attributes in link reference definitions did not have a space preceding.

commite02cfcdeaccf588399579283998a7fb93a5c08f6 authorMauro Bieg <mb21@users.noreply.github.com> dateWed 3 May 2017, 12:13 (10 years ago) parentcd2551c
2 files changed+9−1
src/Text/Pandoc/Writers/Markdown.hs+1−1 test/command/3630.md+8
src/Text/Pandoc/Writers/Markdown.hs+1−1
@@ -241,7 +241,7 @@ keyToMarkdown opts (label', (src, tit), attr) = do
241241 else space <> "\"" <> text tit <> "\""
242242 return $ nest 2 $ hang 2
243243 ("[" <> label' <> "]:" <> space) (text src <> tit')
244− <> linkAttributes opts attr
244+ <+> linkAttributes opts attr
245245
246246-- | Return markdown representation of notes.
247247notesToMarkdown :: PandocMonad m => WriterOptions -> [[Block]] -> MD m Doc
test/command/3630.mdnew file+8
@@ -0,0 +1,8 @@
1+```
2+% pandoc -f markdown -t markdown --reference-links
3+![foo](bar.png){#myId}
4+^D
5+![foo]
6+
7+ [foo]: bar.png {#myId}
8+```