Skip to content

Commit 66ea8c4

Browse files
authored
Merge pull request #11096 from quarto-dev/bugfix/10401
lua,crossref,docx - warn when crossref is empty
2 parents e59b35c + a071dd7 commit 66ea8c4

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

news/changelog-1.6.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ All changes included in 1.6:
5252
- ([#10212](https://github.com/quarto-dev/quarto-cli/issues/10212)): Move Pandoc variables to the function declaration for the default template.
5353
- ([#10438](https://github.com/quarto-dev/quarto-cli/issues/10438)): Ensure Pandoc doesn't emit its own crossref environments for table elements.
5454

55+
## `docx` Format
56+
57+
- ([#10401](https://github.com/quarto-dev/quarto-cli/issues/10401)): Fix crash when `docx` format is used with an empty crossref environment.
58+
5559
## `latex` and `pdf` Format
5660

5761
- ([#10291](https://github.com/quarto-dev/quarto-cli/issues/10291)): Several improvement regarding Quarto LaTeX engine behavior for missing hyphenation log message:

src/resources/filters/customnodes/floatreftarget.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,10 @@ end, function(float)
676676
local row = pandoc.List()
677677
local cell = pandoc.Div({})
678678
cell.attr = pandoc.Attr(float.identifier, float.classes or {}, float.attributes or {})
679+
if float.content == nil then
680+
warn("FloatRefTarget with no content: " .. float.identifier)
681+
return pandoc.Div({})
682+
end
679683
local c = float.content.content or float.content
680684
if pandoc.utils.type(c) == "Block" then
681685
cell.content:insert(c)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: test
3+
format: docx
4+
---
5+
6+
7+
::: {#tbl-t2}
8+
9+
:::

0 commit comments

Comments
 (0)