git.iko.soy/typeable/pandoc
on master help sign in
Replaced --biblio-file with --bibliography, removed --biblio-format.
7aecdddJohn MacFarlane
src/pandoc.hs+9−18
@@ -163,8 +163,7 @@ data Opt = Opt
163 , optIndentedCodeClasses :: [String] -- ^ Default classes for indented code blocks
163 , optIndentedCodeClasses :: [String] -- ^ Default classes for indented code blocks
164 , optDataDir :: Maybe FilePath
164 , optDataDir :: Maybe FilePath
165#ifdef _CITEPROC
165#ifdef _CITEPROC
166− , optBiblioFile :: String
166+ , optBibliography :: [Reference]
167− , optBiblioFormat :: String
168 , optCslFile :: String
167 , optCslFile :: String
169#endif
168#endif
170 }
169 }
@@ -205,8 +204,7 @@ defaultOpts = Opt
205 , optIndentedCodeClasses = []
204 , optIndentedCodeClasses = []
206 , optDataDir = Nothing
205 , optDataDir = Nothing
207#ifdef _CITEPROC
206#ifdef _CITEPROC
208− , optBiblioFile = []
207+ , optBibliography = []
209− , optBiblioFormat = []
210 , optCslFile = []
208 , optCslFile = []
211#endif
209#endif
212 }
210 }
@@ -520,16 +518,14 @@ options =
520 "FORMAT")
518 "FORMAT")
521 "" -- "Print default template for FORMAT"
519 "" -- "Print default template for FORMAT"
522#ifdef _CITEPROC
520#ifdef _CITEPROC
523− , Option "" ["biblio"]
521+ , Option "" ["bibliography"]
524 (ReqArg
522 (ReqArg
525− (\arg opt -> return opt { optBiblioFile = arg} )
523+ (\arg opt -> do
524+ refs <- readBiblioFile arg ""
525+ return opt { optBibliography =
526+ optBibliography opt ++ refs } )
526 "FILENAME")
527 "FILENAME")
527 ""
528 ""
528− , Option "" ["biblio-format"]
529− (ReqArg
530− (\arg opt -> return opt { optBiblioFormat = arg} )
531− "STRING")
532− ""
533 , Option "" ["csl"]
529 , Option "" ["csl"]
534 (ReqArg
530 (ReqArg
535 (\arg opt -> return opt { optCslFile = arg} )
531 (\arg opt -> return opt { optCslFile = arg} )
@@ -684,9 +680,8 @@ main = do
684 , optIndentedCodeClasses = codeBlockClasses
680 , optIndentedCodeClasses = codeBlockClasses
685 , optDataDir = mbDataDir
681 , optDataDir = mbDataDir
686#ifdef _CITEPROC
682#ifdef _CITEPROC
687− , optBiblioFile = biblioFile
683+ , optBibliography = refs
688− , optBiblioFormat = biblioFormat
689− , optCslFile = cslFile
684+ , optCslFile = cslFile
690#endif
685#endif
691 } = opts
686 } = opts
692
687
@@ -746,10 +741,6 @@ main = do
746
741
747 let standalone' = standalone || isNonTextOutput writerName'
742 let standalone' = standalone || isNonTextOutput writerName'
748
743
749−#ifdef _CITEPROC
750− refs <- if null biblioFile then return [] else readBiblioFile biblioFile biblioFormat
751−#endif
752−
753 variables' <- case (writerName', standalone', offline) of
744 variables' <- case (writerName', standalone', offline) of
754 ("s5", True, True) -> do
745 ("s5", True, True) -> do
755 inc <- s5HeaderIncludes datadir
746 inc <- s5HeaderIncludes datadir
tests/RunTests.hs+1−1
@@ -106,7 +106,7 @@ main = do
106 "latex-reader.latex" "latex-reader.native"
106 "latex-reader.latex" "latex-reader.native"
107 r11 <- runTest "native reader" ["-r", "native", "-w", "native", "-s"]
107 r11 <- runTest "native reader" ["-r", "native", "-w", "native", "-s"]
108 "testsuite.native" "testsuite.native"
108 "testsuite.native" "testsuite.native"
109− r14 <- runTest "markdown reader (citations)" ["-r", "markdown", "-w", "plain", "--biblio", "biblio.bib", "--csl", "chicago-author-date.csl"] "markdown-citations.txt" "markdown-citations.plain"
109+ r14 <- runTest "markdown reader (citations)" ["-r", "markdown", "-w", "plain", "--bibliography", "biblio.bib", "--csl", "chicago-author-date.csl"] "markdown-citations.txt" "markdown-citations.plain"
110 r12s <- if runLhsTests
110 r12s <- if runLhsTests
111 then mapM runLhsWriterTest lhsWriterFormats
111 then mapM runLhsWriterTest lhsWriterFormats
112 else putStrLn "Skipping lhs writer tests because they presuppose highlighting support" >> return []
112 else putStrLn "Skipping lhs writer tests because they presuppose highlighting support" >> return []