Skip to content

Commit 0410fb5

Browse files
committed
Require at least pandoc 2.11
1 parent 097276b commit 0410fb5

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ jobs:
2828
pandoc:
2929
- edge
3030
- latest
31-
- 2.17
32-
- '2.9.2.1'
31+
- 2.11
3332

3433
container:
3534
image: pandoc/core:${{ matrix.pandoc }}

multiple-bibliographies.lua

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1515
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1616
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1717
]]
18+
PANDOC_VERSION:must_be_at_least '2.11'
19+
1820
local List = require 'pandoc.List'
1921
local utils = require 'pandoc.utils'
2022
local stringify = utils.stringify
@@ -44,24 +46,12 @@ local citeproc
4446
if utils.citeproc then
4547
-- Built-in Lua function
4648
citeproc = utils.citeproc
47-
elseif PANDOC_VERSION >= "2.11" then
48-
-- We use pandoc instead of pandoc-citeproc starting with pandoc 2.11
49+
else
50+
-- Use pandoc as a citeproc processor
4951
citeproc = function (doc)
5052
local opts = {'--from=json', '--to=json', '--citeproc', '--quiet'}
5153
return run_json_filter(doc, 'pandoc', opts)
5254
end
53-
else
54-
local version = pandoc.pipe('pandoc-citeproc', {'--version'}, '')
55-
local major, minor, patch = version:match 'pandoc%-citeproc (%d+)%.(%d+)%.?(%d*)'
56-
major, minor, patch = tonumber(major), tonumber(minor), tonumber(patch)
57-
local supports_quiet_flag =
58-
major > 0
59-
or minor > 14
60-
or (minor == 14 and patch >= 5)
61-
local opts = {FORMAT, supports_quiet_flag and '-q' or nil}
62-
citeproc = function (doc)
63-
return run_json_filter(doc, 'pandoc-citeproc', opts)
64-
end
6555
end
6656

6757
--- Resolve citations in the document by combining all bibliographies
File renamed without changes.

0 commit comments

Comments
 (0)