Skip to content
Snippets Groups Projects
Verified Commit cbf6d40c authored by Andrei Gherzan's avatar Andrei Gherzan :penguin:
Browse files

contributing: Fix lua stript


The lua script for filtering out toctrees started to fail with the
latest pandoc with:

./CONTRIBUTING.lua:12: attempt to index a nil value (field 'integer
index')

We fix it by using the classes:includes which is simpler and it works.

Signed-off-by: Andrei Gherzan's avatarAndrei Gherzan <andrei.gherzan@huawei.com>
parent 053446ec
No related branches found
No related tags found
1 merge request!38contributing: Fix lua stript
......@@ -8,9 +8,8 @@
-- tool. This is needed when converting a set of reST documents to a markdown
-- one where directives like `toctree` and `contents` are not supported and end
-- up translated literally.
function Div(el)
local class = el["c"][1][2][1]
if class == "toctree" or class == "contents" then
function Div(div)
if div.classes:includes('toctree') or div.classes:includes('contents') then
return {}
else
return nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment