Skip to content

Commit 78e24db

Browse files
committed
diagram-generators: ensure 'stringify' works on plain strings
The function `pandoc.utils.stringify` has a bug in pandoc 2.15.0, so we need this workaround for that version. Fixes: #193
1 parent e5e7f85 commit 78e24db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

diagram-generator/diagram-generator.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ PANDOC_VERSION:must_be_at_least '2.7.3'
1616

1717
local system = require 'pandoc.system'
1818
local utils = require 'pandoc.utils'
19-
local stringify = utils.stringify
19+
local stringify = function (s)
20+
return type(s) == 'string' and s or utils.stringify(s)
21+
end
2022
local with_temporary_directory = system.with_temporary_directory
2123
local with_working_directory = system.with_working_directory
2224

0 commit comments

Comments
 (0)