Closed dmitryperets closed 9 months ago
On pandoc 3.1.11.1:
% pandoc --version pandoc 3.1.11.1 Features: +server +lua Scripting engine: Lua 5.4
Trying to render a simple table without ID (the filter is not expected to do anything here):
% cat table.md Revision Date Change Description ---------- ------------ -------------------- 0.5 2022-07-05 Initial Draft
This results in failure:
% pandoc table.md --lua-filter refnos.lua -o table.html Error running filter refnos.lua: refnos.lua:71: attempt to index a nil value (field 'integer index') stack traceback: refnos.lua:247: in function <refnos.lua:244>
The problem seems to be here: https://github.com/tstenner/luarefnos/blob/4ae8fbca1d72c76481c975ab83649764c9557abb/refnos.lua#L245
I fixed it by replacing this line with:
if tbl.attr.identifier ~= "" then
That fixes it, many thanks! I have added a test case and pushed the change.
On pandoc 3.1.11.1:
Trying to render a simple table without ID (the filter is not expected to do anything here):
This results in failure:
The problem seems to be here: https://github.com/tstenner/luarefnos/blob/4ae8fbca1d72c76481c975ab83649764c9557abb/refnos.lua#L245
I fixed it by replacing this line with: