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
This commit is contained in:
fiddlosopher 2007-01-05 00:55:38 +00:00
parent a5e3c09fc7
commit 39eb8cbad8
2 changed files with 7 additions and 7 deletions

View file

@ -176,7 +176,7 @@ inlineToMarkdown (Link txt (Src src tit)) =
inlineToMarkdown (Link txt (Ref ref)) =
let first = char '[' <> inlineListToMarkdown txt <> char ']'
second = if (txt == ref)
then empty
then text "[]"
else char '[' <> inlineListToMarkdown ref <> char ']' in
first <> second
inlineToMarkdown (Image alternate (Src source tit)) =

View file

@ -531,13 +531,13 @@ Foo [bar][a].
With [embedded [brackets]][b].
[b] by itself should be a link.
[b][] by itself should be a link.
Indented [once].
Indented [once][].
Indented [twice].
Indented [twice][].
Indented [thrice].
Indented [thrice][].
This should [not][] be a link.
@ -550,7 +550,7 @@ This should [not][] be a link.
[b]: /url/
Foo [bar].
Foo [bar][].
Foo [biz](/url/ "Title with &quot;quote&quot; inside").
@ -595,7 +595,7 @@ Auto-links should not occur here: `<http://example.com/>`
From "Voyage dans la Lune" by Georges Melies (1902):
![lalune]
![lalune][]
[lalune]: lalune.jpg "Voyage dans la Lune"