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
1 change: 1 addition & 0 deletions news/changelog-1.10.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ All changes included in 1.10:
## Other fixes and improvements

- ([#6651](https://github.com/quarto-dev/quarto-cli/issues/6651)): Fix dart-sass compilation failing in enterprise environments where `.bat` files are blocked by group policy.
- ([#14255](https://github.com/quarto-dev/quarto-cli/issues/14255)): Fix shortcodes inside inline and display math expressions not being resolved.

4 changes: 4 additions & 0 deletions src/resources/filters/customnodes/shortcodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,10 @@ function shortcodes_filter()
doc = _quarto.ast.walk(doc, {
Shortcode = inline_handler,
RawInline = code_handler,
Math = function(el)
el.text = apply_code_shortcode(el.text)
return el
end,
Image = function(el)
el = attr_handler(el)
el.src = apply_code_shortcode(el.src)
Expand Down
1 change: 1 addition & 0 deletions src/resources/pandoc/datadir/readqmd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ local function readqmd(txt, opts)
Code = unshortcode_text,
RawInline = unshortcode_text,
RawBlock = unshortcode_text,
Math = unshortcode_text,
Header = filter_attrs,
Span = filter_attrs,
Div = filter_attrs,
Expand Down
17 changes: 17 additions & 0 deletions tests/docs/smoke-all/shortcodes/shortcode-math.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Shortcode in Math
format: html
five: 5
_quarto:
tests:
html:
ensureFileRegexMatches:
- ['5 \+ 5']
- ['b58fc729|7B7B3C']
---

Inline: $5 + {{< meta five >}}$

Display: $$5 + {{< meta five >}}$$

Plain: {{< meta five >}}
Loading