CDSoft / panda

Panda is a Pandoc Lua filter that works on internal Pandoc's AST. Panda is heavily inspired by [abp](http:/cdelord.fr/abp) reimplemented as a Pandoc Lua filter.
https://cdelord.fr/panda
GNU General Public License v3.0
44 stars 5 forks source link

don't unpack boolean metadata #3

Closed kbro237 closed 3 years ago

kbro237 commented 3 years ago

Here's my simple proposal for #2

Still new to lua and I'm not 100% certain of how panda and pandoc lua filters work, but this solves the problem on my end.

CDSoft commented 3 years ago

Hello. Thank you for your patch. I tried to add some tests and booleans can not simply be stored as booleans ({{link-citations}} will crash Pandoc). I will propose a slightly different solution where non table values are converted to strings.

kbro237 commented 3 years ago

I wonder why it didn't crash in my tests. Regardless, thank you for finding a better solution!

CDSoft commented 3 years ago

Did you try to use the value of link-citations in the document with {{link-citations}}? Which version of Pandoc are you using? (mine is pandoc 2.9.2.1)

kbro237 commented 3 years ago

Oh yes, you're right, I never used the variable in the body. Thanks!