git.iko.soy/typeable/pandoc
on master help sign in
Brought citeproc support up to date for citeproc-hs-0.2.

(Patch by Andrea Rossato.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@1518 788f1e2b-df1e-0410-8736-df70ead52e1b

commit243008242d76017d3828550d2ec23580894d5490 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateMon 29 Dec 2008, 22:45 (18 years ago) parentdf4d5b9
2 files changed+15−7
Main.hs+14−6 pandoc.cabal+1−1
Main.hs+14−6
@@ -154,7 +154,8 @@ data Opt = Opt
154154 , optWrapText :: Bool -- ^ Wrap text
155155 , optSanitizeHTML :: Bool -- ^ Sanitize HTML
156156#ifdef _CITEPROC
157− , optModsFile :: String
157+ , optBiblioFile :: String
158+ , optBiblioFormat :: String
158159 , optCslFile :: String
159160#endif
160161 }
@@ -187,7 +188,8 @@ defaultOpts = Opt
187188 , optWrapText = True
188189 , optSanitizeHTML = False
189190#ifdef _CITEPROC
190− , optModsFile = []
191+ , optBiblioFile = []
192+ , optBiblioFormat = []
191193 , optCslFile = []
192194#endif
193195 }
@@ -364,11 +366,16 @@ options =
364366 "FORMAT")
365367 "" -- "Print default header for FORMAT"
366368#ifdef _CITEPROC
367− , Option "" ["mods"]
369+ , Option "" ["biblio"]
368370 (ReqArg
369− (\arg opt -> return opt { optModsFile = arg} )
371+ (\arg opt -> return opt { optBiblioFile = arg} )
370372 "FILENAME")
371373 ""
374+ , Option "" ["biblio-format"]
375+ (ReqArg
376+ (\arg opt -> return opt { optBiblioFormat = arg} )
377+ "STRING")
378+ ""
372379 , Option "" ["csl"]
373380 (ReqArg
374381 (\arg opt -> return opt { optCslFile = arg} )
@@ -513,7 +520,8 @@ main = do
513520 , optWrapText = wrap
514521 , optSanitizeHTML = sanitize
515522#ifdef _CITEPROC
516− , optModsFile = modsFile
523+ , optBiblioFile = biblioFile
524+ , optBiblioFormat = biblioFormat
517525 , optCslFile = cslFile
518526#endif
519527 } = opts
@@ -566,7 +574,7 @@ main = do
566574 let standalone' = (standalone && not strict) || isNonTextOutput writerName'
567575
568576#ifdef _CITEPROC
569− refs <- if null modsFile then return [] else readModsColletionFile modsFile
577+ refs <- if null biblioFile then return [] else readBiblioFile biblioFile biblioFormat
570578#endif
571579
572580 let startParserState =
pandoc.cabal+1−1
@@ -199,7 +199,7 @@ Executable pandoc
199199 if flag(highlighting)
200200 cpp-options: -D_HIGHLIGHTING
201201 if flag(citeproc)
202− Build-depends: citeproc-hs
202+ Build-depends: citeproc-hs >= 0.2
203203 cpp-options: -D_CITEPROC
204204 if flag(executable)
205205 Buildable: True