Skip to content

Commit e2c4cb4

Browse files
committed
test - equation with crossref can be modified in Lua
See #383
1 parent 2c37a1f commit e2c4cb4

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
format:
3+
html: default
4+
latex: default
5+
_quarto:
6+
tests:
7+
html:
8+
ensureHtmlElements:
9+
- ['a.quarto-xref[href~="#eq-x"]']
10+
- []
11+
ensureFileRegexMatches:
12+
- ['x \+ z \\tag\{1\}']
13+
- ['x \+ y']
14+
latex:
15+
ensureFileRegexMatches:
16+
- ['Equation\~\\ref\{eq-x\}', '\\label\{eq-x\}\{x \+ z\}']
17+
- ['x + y']
18+
filters:
19+
- eq.lua
20+
---
21+
22+
$$x + y$$ {#eq-x}
23+
24+
See @eq-x.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
function Math(el)
2+
el.text = el.text:gsub("y", "z")
3+
return el
4+
end

0 commit comments

Comments
 (0)