Skip to content

Commit 649b812

Browse files
committed
diagram-generator: stringify all paths
Otherwise the path meta values cannot be set in YAML metadata. Fixes: #99
1 parent 5ab3a91 commit 649b812

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

diagram-generator/diagram-generator.lua

+16-7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ License: MIT – see LICENSE file for details
1515
PANDOC_VERSION:must_be_at_least '2.7.3'
1616

1717
local system = require 'pandoc.system'
18+
local utils = require 'pandoc.utils'
19+
local stringify = utils.stringify
1820
local with_temporary_directory = system.with_temporary_directory
1921
local with_working_directory = system.with_working_directory
2022

@@ -77,20 +79,27 @@ end
7779
-- meta options was set, it gets used instead of the corresponding
7880
-- environment variable:
7981
function Meta(meta)
80-
plantuml_path =
82+
plantuml_path = stringify(
8183
meta.plantuml_path or meta.plantumlPath or plantuml_path
82-
inkscape_path =
84+
)
85+
inkscape_path = stringify(
8386
meta.inkscape_path or meta.inkscapePath or inkscape_path
84-
python_path =
87+
)
88+
python_path = stringify(
8589
meta.python_path or meta.pythonPath or python_path
86-
python_activate_path =
90+
)
91+
python_activate_path = stringify(
8792
meta.activate_python_path or meta.activatePythonPath or python_activate_path
88-
java_path =
93+
)
94+
java_path = stringify(
8995
meta.java_path or meta.javaPath or java_path
90-
dot_path =
96+
)
97+
dot_path = stringify(
9198
meta.path_dot or meta.dotPath or dot_path
92-
pdflatex_path =
99+
)
100+
pdflatex_path = stringify(
93101
meta.pdflatex_path or meta.pdflatexPath or pdflatex_path
102+
)
94103
end
95104

96105
-- Call plantuml.jar with some parameters (cf. PlantUML help):

0 commit comments

Comments
 (0)