From be34ad5b1d7ee3e426906bdff6faecaee29cb57c Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sun, 7 Mar 2010 19:36:00 +0000 Subject: Markdown writer: Fixed citations. Previously the markdown writer printed raw citation codes, e.g. [geach1970], rather than the expanded citations provided by citeproc, e.g. (Geach 1970). Now it prints the expanded citations. This means that the document produced can be processed as a markdown document without citeproc. Thanks to dsanson for reporting, and arossato for the patch. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1871 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/Markdown.hs | 8 +------- 1 file changed, 1 insertion(+), 7 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 000b5d988..af7ec6e43 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -351,13 +351,7 @@ inlineToMarkdown _ (TeX str) = return $ text str inlineToMarkdown _ (HtmlInline str) = return $ text str inlineToMarkdown _ (LineBreak) = return $ text " \n" inlineToMarkdown _ Space = return $ char ' ' -inlineToMarkdown _ (Cite cits _ ) = do - let format (a,b) xs = text a <> - (if b /= [] then char '@' else empty) <> - text b <> - (if isEmpty xs then empty else text "; ") <> - xs - return $ char '[' <> foldr format empty cits <> char ']' +inlineToMarkdown opts (Cite _ cits) = inlineListToMarkdown opts cits inlineToMarkdown opts (Link txt (src, tit)) = do linktext <- inlineListToMarkdown opts txt let linktitle = if null tit then empty else text $ " \"" ++ tit ++ "\"" -- cgit v1.2.3