diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2010-03-07 19:36:00 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2010-03-07 19:36:00 +0000 |
commit | be34ad5b1d7ee3e426906bdff6faecaee29cb57c (patch) | |
tree | 2d720b7a7947f5a37a0a5e05f9fe32f85772097a /src | |
parent | c2ce51e9f568797bac119d54e7253faa1a597ce0 (diff) | |
download | pandoc-be34ad5b1d7ee3e426906bdff6faecaee29cb57c.tar.gz |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 8 |
1 files changed, 1 insertions, 7 deletions
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 ++ "\"" |