From 3a6296acae34ddb2ea7678ee6d8c727aab4eb087 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Tue, 19 Dec 2006 07:30:36 +0000 Subject: 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 --- src/Text/Pandoc/Writers/Markdown.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Text/Pandoc/Writers/Markdown.hs') 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 ']' -- cgit v1.2.3