git.iko.soy/typeable/pandoc
on master help sign in
Biblio: Removed stringify; pass inline list to citeproc.
commitdbe0cefc9a63af4333b17c06ad6308a9e0d85799 authorJohn MacFarlane <jgm@berkeley.edu> dateWed 17 Nov 2010, 15:36 (16 years ago) parent47c64d4
1 file changed+2−12
src/Text/Pandoc/Biblio.hs+2−12
src/Text/Pandoc/Biblio.hs+2−12
@@ -150,16 +150,6 @@ setCiteNoteNum _ _ = []
150150setCitationNoteNum :: Int -> [Citation] -> [Citation]
151151setCitationNoteNum i = map $ \c -> c { citationNoteNum = i}
152152
153−-- a temporary function to tide us over until citeproc is
154−-- changed to use Inline lists for prefixes and suffixes...
155−stringify :: [Inline] -> String
156−stringify = queryWith go
157− where go :: Inline -> [Char]
158− go Space = " "
159− go (Str x) = x
160− go (Code x) = x
161− go _ = ""
162−
163153toCslCite :: Citation -> CSL.Cite
164154toCslCite c
165155 = let (la,lo) = parseLocator $ citationLocator c
@@ -168,8 +158,8 @@ toCslCite c
168158 SuppressAuthor -> (False,True )
169159 NormalCitation -> (False,False)
170160 in emptyCite { CSL.citeId = citationId c
171− , CSL.citePrefix = stringify $ citationPrefix c
172− , CSL.citeSuffix = stringify $ citationSuffix c
161+ , CSL.citePrefix = PandocText $ citationPrefix c
162+ , CSL.citeSuffix = PandocText $ citationSuffix c
173163 , CSL.citeLabel = la
174164 , CSL.citeLocator = lo
175165 , CSL.citeNoteNumber = show $ citationNoteNum c