Skip to content

Commit

Permalink
Merge pull request #7629 from quarto-dev/bugfix/7236-b
Browse files Browse the repository at this point in the history
index.lua: be more robust when converting index caption to string
  • Loading branch information
cscheid authored Nov 17, 2023
2 parents 13a4d21 + 3587e53 commit fee994d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/resources/filters/crossref/index.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,7 @@ end

local function index_caption(v)
if #v.caption > 0 then
if pandoc.utils.type(v.caption[1]) == "Inline" then
return inlinesToString(pandoc.Inlines({v.caption[1]}))
else
return inlinesToString(pandoc.Inlines(v.caption[1].content))
end
return inlinesToString(quarto.utils.as_inlines(v.caption))
else
return ""
end
Expand Down
1 change: 1 addition & 0 deletions tests/docs/smoke-all/2023/11/17/foo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.quarto/
19 changes: 19 additions & 0 deletions tests/docs/smoke-all/2023/11/17/foo/7236.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "Raw TeX cross referencing"
format:
pdf: default
---

See @tbl-tex:

```{=latex}
\begin{tabular}{@{}lll@{}}
\label{tbl-tex}
\caption{Some letters with LaTeX}
\toprule
Column 1 & Column 2 & Column 3 \\ \midrule
A & B & C \\
D & E & F \\
G & H & I \\ \bottomrule
\end{tabular}
```
7 changes: 7 additions & 0 deletions tests/docs/smoke-all/2023/11/17/foo/Foo.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Foo"
---

## Quarto

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
5 changes: 5 additions & 0 deletions tests/docs/smoke-all/2023/11/17/foo/_quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
project:
title: "Foo"



0 comments on commit fee994d

Please sign in to comment.