Figure with empty caption and cross-ref label rendered to HTML crashes main.lua #10281
Labels
backport
bug
Something isn't working
lightbox
regression
Functionality that used to work but now is broken.
Milestone
Bug description
There appears to be something in Lua filter causing errors when I do not have a caption for a figure but I do have it labeled for cross-reference. I believe this is related to #9675
Steps to reproduce
The following code is for a graph (this also happens with images with no captions) with no fig-cap but has a label. This will produce a Lua error (as shown below).
If I remove the label inside the r code and use
:::{#fig-Rgraph}
before the code and remove the#|label
from the code chunk it will render properly. All of my previously working graphs and images now throw this error when trying to render.Expected behavior
The code should render to html as a graph.
Actual behavior
Lua Error:
Your environment
Quarto check output
Quarto 1.5.53
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.2.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.41.0: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.5.53
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/jmh491/Library/TinyTeX/bin/universal-darwin
Version: 2023
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.12.3
Path: /Library/Frameworks/Python.framework/Versions/3.12/bin/python3
Jupyter: 5.7.2
Kernels: sas, python3
(/) Checking Jupyter engine render....Traceback (most recent call last):
File "/Applications/quarto/share/jupyter/jupyter.py", line 21, in
from notebook import notebook_execute, RestartKernel
File "/Applications/quarto/share/jupyter/notebook.py", line 15, in
from yaml import safe_load as parse_string
ModuleNotFoundError: No module named 'yaml'
[✓] Checking Jupyter engine render....OK
The text was updated successfully, but these errors were encountered: