-
Notifications
You must be signed in to change notification settings - Fork 414
Description
{{< meta key >}} drops everything after the first space when the value appears in raw HTML contexts (include-after-body text blocks, raw HTML blocks). Inline paragraph usage works correctly. This is a regression introduced by #14073.
Repro
_quarto.yml:
project:
type: website
my-value: Release Candidateindex.qmd:
---
format: html
include-after-body:
text: |
<script>window["test-include"] = '{{< meta my-value >}}';</script>
---
Inline: {{< meta my-value >}}
```{=html}
<script>window["test-rawblock"] = '{{< meta my-value >}}';</script>
```Output:
Inline: Release Candidate ← correct
window["test-rawblock"] = 'Release' ← truncated
window["test-include"] = 'Release' ← truncated
Root Cause
#14073 (commit f6ecb11) added a text context branch to handleMeta() at src/resources/filters/quarto-pre/shortcodes-handlers.lua:270:
if type(optionValue) == "table" and #optionValue > 0 and optionValue[1].t == "Str" then
return optionValue[1].textFor "Release Candidate" = [Str("Release"), Space, Str("Candidate")], only optionValue[1].text ("Release") is returned. The condition #optionValue > 0 matches all multi-word strings, but was intended only for single-node pandoc-native values.
Version
Works in v1.9.23, broken since v1.9.24 (first release containing f6ecb11).
Real-world Impact
quarto.org download buttons show "1.9.29 Release" instead of "1.9.29 Release Candidate" because prerelease-mode is set via include-after-body text block.