Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

callouts with no title #2

Closed
ChristopherBarrington opened this issue Aug 29, 2023 · 1 comment
Closed

callouts with no title #2

ChristopherBarrington opened this issue Aug 29, 2023 · 1 comment

Comments

@ChristopherBarrington
Copy link

I get an error when making a callout without an explicit title. I used the MWE in #1 and removed the title and get the following error:

Error running filter /opt/miniconda3/envs/r-4.3.1/share/quarto/filters/main.lua:
/opt/miniconda3/envs/r-4.3.1/share/quarto/filters/main.lua:3125: attempt to index a nil value (field 'integer index')
stack traceback:
	/opt/miniconda3/envs/r-4.3.1/share/quarto/filters/main.lua:10765: in field 'parse'
	/opt/miniconda3/envs/r-4.3.1/share/quarto/filters/main.lua:389: in function </opt/miniconda3/envs/r-4.3.1/share/quarto/filters/main.lua:384>
	[C]: in ?
	[C]: in method 'walk'
	/opt/miniconda3/envs/r-4.3.1/share/quarto/filters/main.lua:171: in function 'run_emulated_filter'
	/opt/miniconda3/envs/r-4.3.1/share/quarto/filters/main.lua:449: in local 'callback'
	/opt/miniconda3/envs/r-4.3.1/share/quarto/filters/main.lua:454: in upvalue 'run_emulated_filter_chain'
	/opt/miniconda3/envs/r-4.3.1/share/quarto/filters/main.lua:495: in function </opt/miniconda3/envs/r-4.3.1/share/quarto/filters/main.lua:476>
stack traceback:
	/opt/miniconda3/envs/r-4.3.1/share/quarto/filters/main.lua:171: in function 'run_emulated_filter'
	/opt/miniconda3/envs/r-4.3.1/share/quarto/filters/main.lua:449: in local 'callback'
	/opt/miniconda3/envs/r-4.3.1/share/quarto/filters/main.lua:454: in upvalue 'run_emulated_filter_chain'
	/opt/miniconda3/envs/r-4.3.1/share/quarto/filters/main.lua:495: in function </opt/miniconda3/envs/r-4.3.1/share/quarto/filters/main.lua:476>

I believe it is the following line and with the below amendment the code works as expected in my case (using the quarto-default callout title).

call.title = call.title:walk(replace_abbr)

  if call.title then
    call.title = call.title:walk(replace_abbr)
  end
@ute
Copy link
Owner

ute commented Feb 17, 2024

Thanks a lot, @ChristopherBarrington ! Sorry, I somehow missed this one out totally. Code is fixed, including callouts with empty bodies, that were also affected.

@ute ute closed this as completed Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants