From 6f2347635ca86f4152e71ad766fea486692dd63d Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 22 Oct 2012 19:11:56 -0700 Subject: [PATCH] LaTeX reader: Initialize citationSuppressParens field. --- src/Text/Pandoc/Readers/LaTeX.hs | 1 + tests/Tests/Readers/LaTeX.hs | 3 ++- tests/latex-reader.native | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 14efedef4..5a2b7b6c1 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -909,6 +909,7 @@ simpleCiteArgs = try $ do , citationMode = NormalCitation , citationHash = 0 , citationNoteNum = 0 + , citationSuppressParens = False } return $ addPrefix pre $ addSuffix suf $ map conv keys diff --git a/tests/Tests/Readers/LaTeX.hs b/tests/Tests/Readers/LaTeX.hs index febc91765..19e0aa4dd 100644 --- a/tests/Tests/Readers/LaTeX.hs +++ b/tests/Tests/Readers/LaTeX.hs @@ -67,7 +67,8 @@ baseCitation = Citation{ citationId = "item1" , citationSuffix = [] , citationMode = AuthorInText , citationNoteNum = 0 - , citationHash = 0 } + , citationHash = 0 + , citationSuppressParens = False } rt :: String -> Inlines rt = rawInline "latex" diff --git a/tests/latex-reader.native b/tests/latex-reader.native index 67a4e9011..6ddcac6d7 100644 --- a/tests/latex-reader.native +++ b/tests/latex-reader.native @@ -260,7 +260,7 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA ,HorizontalRule ,Header 1 [Str "LaTeX"] ,BulletList - [[Para [Cite [Citation {citationId = "smith.1899", citationPrefix = [], citationSuffix = [Str ",",Space,Str "22-23"], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 0}] [RawInline "latex" "\\cite[22-23]{smith.1899}"]]] + [[Para [Cite [Citation {citationId = "smith.1899", citationPrefix = [], citationSuffix = [Str ",",Space,Str "22-23"], citationMode = AuthorInText, citationNoteNum = 0, citationSuppressParens = False, citationHash = 0}] [RawInline "latex" "\\cite[22-23]{smith.1899}"]]] ,[Para [RawInline "latex" "\\doublespacing"]] ,[Para [Math InlineMath "2+2=4"]] ,[Para [Math InlineMath "x \\in y"]]