kdheepak/panvimdoc

panvimdoc.lua:76: attempt to concatenate a table value (field 'project')

jfishe opened this issue · 1 comments

Thank you for putting this together. I don't speak Lua but think I've found a bug when using the YAML metadata instead of --metadata command line option.

The following line at the top of README.md produces the subject error.

---
description: 'Filter and convert Vimwiki notes using pandoc'
project: panvimwiki
---

The following works as expected.

cat README.md | pandoc --metadata=project:panvimwiki  \
--metadata=description:'Output vimdoc project  name' \
--lua-filter=build/panvimdoc/scripts/include-files.lua  \
--to=build/panvimdoc/scripts/panvimdoc.lua --shift-heading-level-by=-1  --verbose

The fix appears to be meta.project should be stringify(meta.project) if I'm understanding Lua correctly. I'll start on a pull request as there are several lines besides 76 affected.

Thanks for opening an issue. I’m sure there’ll be other issues like this, since I only tested it with a subset of the multitude of ways you can use pandoc.