Skip to content

Commit b1a13fa

Browse files
committed
include-files: respect global options when parsing include files
1 parent d9562fb commit b1a13fa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

include-files/include-files.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ function transclude (cb)
8787
if not fh then
8888
io.stderr:write("Cannot open file " .. line .. " | Skipping includes\n")
8989
else
90-
local contents = pandoc.read(fh:read '*a', format).blocks
90+
-- read file as the given format with global reader options
91+
local contents = pandoc.read(
92+
fh:read '*a',
93+
format,
94+
PANDOC_READER_OPTIONS
95+
).blocks
9196
last_heading_level = 0
9297
-- recursive transclusion
9398
contents = system.with_working_directory(

0 commit comments

Comments
 (0)