git.iko.soy/typeable/pandoc
on master help sign in
Brought citeproc support up to date for citeproc-hs-0.2.
2430082fiddlosopher
Main.hs+14−6
@@ -154,7 +154,8 @@ data Opt = Opt
154 , optWrapText :: Bool -- ^ Wrap text
154 , optWrapText :: Bool -- ^ Wrap text
155 , optSanitizeHTML :: Bool -- ^ Sanitize HTML
155 , optSanitizeHTML :: Bool -- ^ Sanitize HTML
156#ifdef _CITEPROC
156#ifdef _CITEPROC
157− , optModsFile :: String
157+ , optBiblioFile :: String
158+ , optBiblioFormat :: String
158 , optCslFile :: String
159 , optCslFile :: String
159#endif
160#endif
160 }
161 }
@@ -187,7 +188,8 @@ defaultOpts = Opt
187 , optWrapText = True
188 , optWrapText = True
188 , optSanitizeHTML = False
189 , optSanitizeHTML = False
189#ifdef _CITEPROC
190#ifdef _CITEPROC
190− , optModsFile = []
191+ , optBiblioFile = []
192+ , optBiblioFormat = []
191 , optCslFile = []
193 , optCslFile = []
192#endif
194#endif
193 }
195 }
@@ -364,11 +366,16 @@ options =
364 "FORMAT")
366 "FORMAT")
365 "" -- "Print default header for FORMAT"
367 "" -- "Print default header for FORMAT"
366#ifdef _CITEPROC
368#ifdef _CITEPROC
367− , Option "" ["mods"]
369+ , Option "" ["biblio"]
368 (ReqArg
370 (ReqArg
369− (\arg opt -> return opt { optModsFile = arg} )
371+ (\arg opt -> return opt { optBiblioFile = arg} )
370 "FILENAME")
372 "FILENAME")
371 ""
373 ""
374+ , Option "" ["biblio-format"]
375+ (ReqArg
376+ (\arg opt -> return opt { optBiblioFormat = arg} )
377+ "STRING")
378+ ""
372 , Option "" ["csl"]
379 , Option "" ["csl"]
373 (ReqArg
380 (ReqArg
374 (\arg opt -> return opt { optCslFile = arg} )
381 (\arg opt -> return opt { optCslFile = arg} )
@@ -513,7 +520,8 @@ main = do
513 , optWrapText = wrap
520 , optWrapText = wrap
514 , optSanitizeHTML = sanitize
521 , optSanitizeHTML = sanitize
515#ifdef _CITEPROC
522#ifdef _CITEPROC
516− , optModsFile = modsFile
523+ , optBiblioFile = biblioFile
524+ , optBiblioFormat = biblioFormat
517 , optCslFile = cslFile
525 , optCslFile = cslFile
518#endif
526#endif
519 } = opts
527 } = opts
@@ -566,7 +574,7 @@ main = do
566 let standalone' = (standalone && not strict) || isNonTextOutput writerName'
574 let standalone' = (standalone && not strict) || isNonTextOutput writerName'
567
575
568#ifdef _CITEPROC
576#ifdef _CITEPROC
569− refs <- if null modsFile then return [] else readModsColletionFile modsFile
577+ refs <- if null biblioFile then return [] else readBiblioFile biblioFile biblioFormat
570#endif
578#endif
571
579
572 let startParserState =
580 let startParserState =
pandoc.cabal+1−1
@@ -199,7 +199,7 @@ Executable pandoc
199 if flag(highlighting)
199 if flag(highlighting)
200 cpp-options: -D_HIGHLIGHTING
200 cpp-options: -D_HIGHLIGHTING
201 if flag(citeproc)
201 if flag(citeproc)
202− Build-depends: citeproc-hs
202+ Build-depends: citeproc-hs >= 0.2
203 cpp-options: -D_CITEPROC
203 cpp-options: -D_CITEPROC
204 if flag(executable)
204 if flag(executable)
205 Buildable: True
205 Buildable: True