aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Markdown.hs
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-12-19 07:30:36 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-12-19 07:30:36 +0000
commit3a6296acae34ddb2ea7678ee6d8c727aab4eb087 (patch)
treea1e35b6d586dbf72ac0314241f1bae1881d51162 /src/Text/Pandoc/Writers/Markdown.hs
parenta8bbd950e526abb69262fb7186ced583885c6ac8 (diff)
downloadpandoc-3a6296acae34ddb2ea7678ee6d8c727aab4eb087.tar.gz
Changed footnote syntax to conform to the de facto standard
for markdown footnotes. References are now like this[^1] rather than like this^(1). There are corresponding changes in the footnotes themselves. See the updated README for more details. git-svn-id: https://pandoc.googlecode.com/svn/trunk@230 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Writers/Markdown.hs')
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index e7c167eb3..18a904fac 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -76,8 +76,8 @@ blockToMarkdown tabStop (Note ref lst) =
else
let first = head lns
rest = tail lns in
- text ("^(" ++ (escapeString ref) ++ ") ") <> (text first) $$ (vcat $
- map (\line -> (text "^ ") <> (text line)) rest) <> (text "\n")
+ text ("[^" ++ (escapeString ref) ++ "]: ") <> (text first) $$ (vcat $
+ map (\line -> (text " ") <> (text line)) rest) <> (text "\n")
blockToMarkdown tabStop (Key txt (Src src tit)) =
text " " <> char '[' <> inlineListToMarkdown txt <> char ']' <> text ": " <> text src <>
(if tit /= "" then (text (" \"" ++ (escapeLinkTitle tit) ++ "\"")) else empty)
@@ -145,4 +145,4 @@ inlineToMarkdown (Image alternate (Ref [])) =
inlineToMarkdown (Image alternate (Ref ref)) =
char '!' <> char '[' <> inlineListToMarkdown alternate <> char ']' <>
char '[' <> inlineListToMarkdown ref <> char ']'
-inlineToMarkdown (NoteRef ref) = char '^' <> char '(' <> text (escapeString ref) <> char ')'
+inlineToMarkdown (NoteRef ref) = text "[^" <> text (escapeString ref) <> char ']'