From 3a6d5427bd51bc48fd1b5f27d1b091b3c734bf71 Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Fri, 17 Nov 2023 14:12:25 -0700 Subject: [PATCH 1/2] use a more robust way to get a string from an Inlines --- src/resources/filters/crossref/index.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/resources/filters/crossref/index.lua b/src/resources/filters/crossref/index.lua index d57e63c227..e95b3f6be2 100644 --- a/src/resources/filters/crossref/index.lua +++ b/src/resources/filters/crossref/index.lua @@ -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 From 3587e53d179de7800ad6be55314558740368d484 Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Fri, 17 Nov 2023 14:15:13 -0700 Subject: [PATCH 2/2] smoke test --- .../docs/smoke-all/2023/11/17/foo/.gitignore | 1 + tests/docs/smoke-all/2023/11/17/foo/7236.qmd | 19 +++++++++++++++++++ tests/docs/smoke-all/2023/11/17/foo/Foo.qmd | 7 +++++++ .../docs/smoke-all/2023/11/17/foo/_quarto.yml | 5 +++++ 4 files changed, 32 insertions(+) create mode 100644 tests/docs/smoke-all/2023/11/17/foo/.gitignore create mode 100644 tests/docs/smoke-all/2023/11/17/foo/7236.qmd create mode 100644 tests/docs/smoke-all/2023/11/17/foo/Foo.qmd create mode 100644 tests/docs/smoke-all/2023/11/17/foo/_quarto.yml diff --git a/tests/docs/smoke-all/2023/11/17/foo/.gitignore b/tests/docs/smoke-all/2023/11/17/foo/.gitignore new file mode 100644 index 0000000000..075b2542af --- /dev/null +++ b/tests/docs/smoke-all/2023/11/17/foo/.gitignore @@ -0,0 +1 @@ +/.quarto/ diff --git a/tests/docs/smoke-all/2023/11/17/foo/7236.qmd b/tests/docs/smoke-all/2023/11/17/foo/7236.qmd new file mode 100644 index 0000000000..8549eabb2d --- /dev/null +++ b/tests/docs/smoke-all/2023/11/17/foo/7236.qmd @@ -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} +``` diff --git a/tests/docs/smoke-all/2023/11/17/foo/Foo.qmd b/tests/docs/smoke-all/2023/11/17/foo/Foo.qmd new file mode 100644 index 0000000000..35c677dac5 --- /dev/null +++ b/tests/docs/smoke-all/2023/11/17/foo/Foo.qmd @@ -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 . diff --git a/tests/docs/smoke-all/2023/11/17/foo/_quarto.yml b/tests/docs/smoke-all/2023/11/17/foo/_quarto.yml new file mode 100644 index 0000000000..fd6f5739cd --- /dev/null +++ b/tests/docs/smoke-all/2023/11/17/foo/_quarto.yml @@ -0,0 +1,5 @@ +project: + title: "Foo" + + +