diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-10-29 15:54:50 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-10-29 15:54:50 -0700 |
commit | bc3f16b0c18e0f04a3e9d3e162f57f8e86cadead (patch) | |
tree | 74356f7acc9dea1fbeb6eac32e999b87e23066e1 | |
parent | bd7c9eb32be7c5499f4a50cb4b5f138f9eb919e8 (diff) | |
download | pandoc-bc3f16b0c18e0f04a3e9d3e162f57f8e86cadead.tar.gz |
Allow citation-abbreviations in defaults file.
-rw-r--r-- | MANUAL.txt | 1 | ||||
-rw-r--r-- | src/Text/Pandoc/App/Opt.hs | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/MANUAL.txt b/MANUAL.txt index 796431114..7ac314b62 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -1533,6 +1533,7 @@ csl: ieee bibliography: - foobar.bib - barbaz.json +citation-abbreviations: abbrevs.json # Filters will be assumed to be Lua filters if they have # the .lua extension, and json filters otherwise. But diff --git a/src/Text/Pandoc/App/Opt.hs b/src/Text/Pandoc/App/Opt.hs index 3da6a936b..64c61fb74 100644 --- a/src/Text/Pandoc/App/Opt.hs +++ b/src/Text/Pandoc/App/Opt.hs @@ -367,6 +367,11 @@ doOpt (k',v) = do foldr addItem o xs) <|> (parseYAML v >>= \(x :: Text) -> return $ \o -> addItem x o) + "citation-abbreviations" -> + parseYAML v >>= \x -> + return (\o -> o{ optMetadata = + addMeta "citation-abbreviations" (T.unpack x) + (optMetadata o) }) "ipynb-output" -> parseYAML v >>= \x -> return (\o -> o{ optIpynbOutput = x }) "include-before-body" -> |