Skip to content

Commit b6ff246

Browse files
committed
Fix --number-sections option check for DOCX
`--number-sections` is an option, not an extension. Therefore, the previous logic didn't work.
1 parent 56dee75 commit b6ff246

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ function Pandoc(doc)
2121
pandoc.log.warn('`native_numbering` extension must not be used. Exiting.')
2222
return
2323
end
24-
if FORMAT == 'docx' and PANDOC_WRITER_OPTIONS.extensions:includes('number_sections') then
24+
if FORMAT == 'docx' and PANDOC_WRITER_OPTIONS.number_sections == true then
2525
pandoc.log.warn(
26-
'`number_sections` extension must not be used with DOCX. '
26+
'`--number-sections` option must not be used with DOCX. '
2727
.. 'Instead, associate a Number Format with your Heading style in your reference-doc. '
2828
.. 'Exiting.'
2929
)

0 commit comments

Comments
 (0)