git.iko.soy/typeable/pandoc
on master help sign in
Changed Markdown writer so that it does not use the single-bracket

style of implicit reference link. It now uses [this style][], not [this style]. Reason: only newer, beta versions of Markdown allow the single-bracket style. git-svn-id: https://pandoc.googlecode.com/svn/trunk@419 788f1e2b-df1e-0410-8736-df70ead52e1b

commit39eb8cbad82c34178f1bfaef7e993b5d5e44defa authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateFri 5 Jan 2007, 00:55 (20 years ago) parenta5e3c09
2 files changed+7−7
src/Text/Pandoc/Writers/Markdown.hs+1−1 tests/writer.markdown+6−6
src/Text/Pandoc/Writers/Markdown.hs+1−1
@@ -176,7 +176,7 @@ inlineToMarkdown (Link txt (Src src tit)) =
176176inlineToMarkdown (Link txt (Ref ref)) =
177177 let first = char '[' <> inlineListToMarkdown txt <> char ']'
178178 second = if (txt == ref)
179− then empty
179+ then text "[]"
180180 else char '[' <> inlineListToMarkdown ref <> char ']' in
181181 first <> second
182182inlineToMarkdown (Image alternate (Src source tit)) =
tests/writer.markdown+6−6
@@ -531,13 +531,13 @@ Foo [bar][a].
531531
532532With [embedded [brackets]][b].
533533
534−[b] by itself should be a link.
534+[b][] by itself should be a link.
535535
536−Indented [once].
536+Indented [once][].
537537
538−Indented [twice].
538+Indented [twice][].
539539
540−Indented [thrice].
540+Indented [thrice][].
541541
542542This should [not][] be a link.
543543
@@ -550,7 +550,7 @@ This should [not][] be a link.
550550
551551 [b]: /url/
552552
553−Foo [bar].
553+Foo [bar][].
554554
555555Foo [biz](/url/ "Title with &quot;quote&quot; inside").
556556
@@ -595,7 +595,7 @@ Auto-links should not occur here: `<http://example.com/>`
595595
596596From "Voyage dans la Lune" by Georges Melies (1902):
597597
598−![lalune]
598+![lalune][]
599599
600600
601601 [lalune]: lalune.jpg "Voyage dans la Lune"