Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .claude/rules/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ For external contributors (not core team):

## Regression Fixes

**What qualifies:** Bugs introduced in recent versions (same major.minor)
**What qualifies:** Bugs introduced in a previous major.minor version (e.g., a 1.8 feature that broke in 1.9)

**Skip changelog entirely** when the regression was introduced by another change in the same version cycle. For example, if a 1.9 bug fix introduced a new bug also fixed in 1.9, the fix does not need a changelog entry — the original entry covers the feature area.

**Placement:** Always at TOP of the file, before Dependencies

Expand Down
15 changes: 15 additions & 0 deletions .claude/rules/testing/smoke-all-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,21 @@ _quarto:
- ['\\begin\{figure\}']
```

### Regex Match Array Format

`ensureFileRegexMatches` (and variants like `ensureTypstFileRegexMatches`, `ensureLatexFileRegexMatches`) takes two arrays:

```yaml
ensureFileRegexMatches:
- # First array: patterns that MUST match
- "pattern1"
- "pattern2"
- # Second array (optional): patterns that must NOT match
- "forbidden-pattern"
```

Both patterns in the first array must be found. Any pattern in the second array causes failure if found.

### Message Verification

Lua `warn()` appears as `level: INFO` on TypeScript side:
Expand Down
4 changes: 3 additions & 1 deletion src/resources/filters/quarto-pre/shortcodes-handlers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,10 @@ function handleMeta(args, _kwargs, _meta, _raw_args, context)
--
-- differently to allow users to specify precisely the
-- string they want to use.
if type(optionValue) == "table" and #optionValue > 0 and optionValue[1].t == "Str" then
if type(optionValue) == "table" and #optionValue == 1 and optionValue[1].t == "Str" then
return optionValue[1].text
elseif pandoc.utils.type(optionValue) == "Inlines" then
return pandoc.utils.stringify(optionValue)
else
local blocks = pandoc.Blocks(optionValue)
return pandoc.write(pandoc.Pandoc(blocks), "markdown")
Expand Down
20 changes: 20 additions & 0 deletions tests/docs/smoke-all/2026/03/05/14159.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
format: html
my-value: Release Candidate
include-after-body:
text: |
<script>window["test-include"] = '{{< meta my-value >}}';</script>
_quarto:
tests:
html:
ensureFileRegexMatches:
-
- "test-include.*Release Candidate"
- "test-rawblock.*Release Candidate"
---

Inline: {{< meta my-value >}}

```{=html}
<script>window["test-rawblock"] = '{{< meta my-value >}}';</script>
```
Loading