diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-12-29 22:45:18 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-12-29 22:45:18 +0000 |
commit | 243008242d76017d3828550d2ec23580894d5490 (patch) | |
tree | 83df6c3de6cc3a2ba097ccc137e64dc9543a9302 | |
parent | df4d5b96c7594f59c519a3b46a8172aae28da963 (diff) | |
download | pandoc-243008242d76017d3828550d2ec23580894d5490.tar.gz |
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
-rw-r--r-- | Main.hs | 20 | ||||
-rw-r--r-- | pandoc.cabal | 2 |
2 files changed, 15 insertions, 7 deletions
@@ -154,7 +154,8 @@ data Opt = Opt , optWrapText :: Bool -- ^ Wrap text , optSanitizeHTML :: Bool -- ^ Sanitize HTML #ifdef _CITEPROC - , optModsFile :: String + , optBiblioFile :: String + , optBiblioFormat :: String , optCslFile :: String #endif } @@ -187,7 +188,8 @@ defaultOpts = Opt , optWrapText = True , optSanitizeHTML = False #ifdef _CITEPROC - , optModsFile = [] + , optBiblioFile = [] + , optBiblioFormat = [] , optCslFile = [] #endif } @@ -364,11 +366,16 @@ options = "FORMAT") "" -- "Print default header for FORMAT" #ifdef _CITEPROC - , Option "" ["mods"] + , Option "" ["biblio"] (ReqArg - (\arg opt -> return opt { optModsFile = arg} ) + (\arg opt -> return opt { optBiblioFile = arg} ) "FILENAME") "" + , Option "" ["biblio-format"] + (ReqArg + (\arg opt -> return opt { optBiblioFormat = arg} ) + "STRING") + "" , Option "" ["csl"] (ReqArg (\arg opt -> return opt { optCslFile = arg} ) @@ -513,7 +520,8 @@ main = do , optWrapText = wrap , optSanitizeHTML = sanitize #ifdef _CITEPROC - , optModsFile = modsFile + , optBiblioFile = biblioFile + , optBiblioFormat = biblioFormat , optCslFile = cslFile #endif } = opts @@ -566,7 +574,7 @@ main = do let standalone' = (standalone && not strict) || isNonTextOutput writerName' #ifdef _CITEPROC - refs <- if null modsFile then return [] else readModsColletionFile modsFile + refs <- if null biblioFile then return [] else readBiblioFile biblioFile biblioFormat #endif let startParserState = diff --git a/pandoc.cabal b/pandoc.cabal index 721268f4e..20968719d 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -199,7 +199,7 @@ Executable pandoc if flag(highlighting) cpp-options: -D_HIGHLIGHTING if flag(citeproc) - Build-depends: citeproc-hs + Build-depends: citeproc-hs >= 0.2 cpp-options: -D_CITEPROC if flag(executable) Buildable: True |