rstudio / pagedown

Paginate the HTML Output of R Markdown with CSS for Print
https://pagedown.rbind.io
Other
894 stars 127 forks source link

Fix Lua filer error with recent Pandoc #245

Closed cderv closed 3 years ago

cderv commented 3 years ago

It seems recent change in Pandoc have created an issue in Lua filters

Error running filter C:/Users/chris/Documents/DEV_R/pagedown/inst/resources/lua/loft.lua:
[string "--[[..."]:123: Constructor for MetaInlines failed: [string "--[[..."]:166: attempt to call a nil value (field 'Str')

stack traceback:
    [C]: in function 'error'
    [string "--[[..."]:123: in field 'MetaInlines'
    ...ris/Documents/DEV_R/pagedown/inst/resources/lua/loft.lua:21: in function <...ris/Documents/DEV_R/pagedown/inst/resources/lua/loft.lua:17>

We need to fix that, and also do #240 so that we can know in advance when something is breaking.

cderv commented 3 years ago

This comes from this change

Block element properties can no longer be accessed by numerical indexing of the .c field. The .c property now serves as an alias for .content, so some filter that used this undocumented method for property access may continue to work, while others will need to be updated and use proper property names.

In pandoc 2.16