wjschne / apaquarto

A quarto extension for creating APA7 documents in .docx, .html, and .pdf formats
https://wjschne.github.io/apaquarto/
Creative Commons Zero v1.0 Universal
170 stars 15 forks source link

Rendering fails when including pagebreak #43

Closed moritzketzer closed 7 months ago

moritzketzer commented 7 months ago

Hi, thanks for the great work!

I stumbled upon the problem that rendering to docx and html fails when I include the pagebreak shortcode {{< pagebreak >}}.

I get the following error when I insert {{< pagebreak >}} into test.qmd.

Error running filter /Applications/quarto/share/filters/main.lua:
...test/_extensions/wjschne/apaquarto/apafigtblappendix.lua:40: bad argument #1 to 'find' (string expected, got nil)
stack traceback:
        ...test/_extensions/wjschne/apaquarto/apafigtblappendix.lua:40: in function <...test/_extensions/wjschne/apaquarto/apafigtblappendix.lua:34>
        [C]: in ?
        [C]: in method 'walk'
        /Applications/quarto/share/filters/main.lua:224: in local 'checked_walk'
        /Applications/quarto/share/filters/main.lua:276: in function 'run_emulated_filter'
        /Applications/quarto/share/filters/main.lua:942: in local 'callback'
        [string "..."]:1888: in field 'withScriptFile'
        /Applications/quarto/share/filters/main.lua:958: in upvalue 'run_emulated_filter_chain'
        /Applications/quarto/share/filters/main.lua:996: in function </Applications/quarto/share/filters/main.lua:993>
stack traceback:
        /Applications/quarto/share/filters/main.lua:224: in local 'checked_walk'
        /Applications/quarto/share/filters/main.lua:276: in function 'run_emulated_filter'
        /Applications/quarto/share/filters/main.lua:942: in local 'callback'
        [string "..."]:1888: in field 'withScriptFile'
        /Applications/quarto/share/filters/main.lua:958: in upvalue 'run_emulated_filter_chain'
        /Applications/quarto/share/filters/main.lua:996: in function </Applications/quarto/share/filters/main.lua:993>
wjschne commented 7 months ago

Thanks for identifying this problem. I think it is fixed with the new release. Let me know.

moritzketzer commented 7 months ago

Yes it's fixed. Thank you. :)