diff options
Diffstat (limited to 'src/Text/Pandoc/App')
-rw-r--r-- | src/Text/Pandoc/App/CommandLineOptions.hs | 6 | ||||
-rw-r--r-- | src/Text/Pandoc/App/FormatHeuristics.hs | 1 | ||||
-rw-r--r-- | src/Text/Pandoc/App/Opt.hs | 5 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs index 99dba4613..36b024ba7 100644 --- a/src/Text/Pandoc/App/CommandLineOptions.hs +++ b/src/Text/Pandoc/App/CommandLineOptions.hs @@ -656,6 +656,12 @@ options = "all|none|best") "" -- "Starting number for sections, subsections, etc." + , Option "C" ["citeproc"] + (NoArg + (\opt -> return opt { optFilters = + optFilters opt ++ [CiteprocFilter] })) + "" -- "Process citations" + , Option "" ["bibliography"] (ReqArg (\arg opt -> return opt{ optMetadata = diff --git a/src/Text/Pandoc/App/FormatHeuristics.hs b/src/Text/Pandoc/App/FormatHeuristics.hs index 97eebe3b6..155b7e586 100644 --- a/src/Text/Pandoc/App/FormatHeuristics.hs +++ b/src/Text/Pandoc/App/FormatHeuristics.hs @@ -74,5 +74,6 @@ formatFromFilePath x = ".xhtml" -> Just "html" ".ipynb" -> Just "ipynb" ".csv" -> Just "csv" + ".bib" -> Just "biblatex" ['.',y] | y `elem` ['1'..'9'] -> Just "man" _ -> Nothing diff --git a/src/Text/Pandoc/App/Opt.hs b/src/Text/Pandoc/App/Opt.hs index 5c39f4ab6..3da6a936b 100644 --- a/src/Text/Pandoc/App/Opt.hs +++ b/src/Text/Pandoc/App/Opt.hs @@ -294,6 +294,11 @@ doOpt (k',v) = do parseYAML v >>= \x -> return (\o -> o{ optColumns = x }) "filters" -> parseYAML v >>= \x -> return (\o -> o{ optFilters = optFilters o <> x }) + "citeproc" -> + parseYAML v >>= \x -> + if x + then return (\o -> o{ optFilters = CiteprocFilter : optFilters o }) + else return id "email-obfuscation" -> parseYAML v >>= \x -> return (\o -> o{ optEmailObfuscation = x }) "identifier-prefix" -> |