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
This commit is contained in:
parent
c2ce51e9f5
commit
be34ad5b1d
1 changed files with 1 additions and 7 deletions
|
@ -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 ++ "\""
|
||||
|
|
Loading…
Reference in a new issue