Skip to content

Commit a2141fe

Browse files
committed
Update latex test for the hypertarget modifcation
Checking Pandoc does not introduce it, and that we handle it.
1 parent 11b670d commit a2141fe

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/smoke/crossref/latex.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,22 @@ const subTableRegexes = [
3232
];
3333

3434
const theoremRegexes = [
35-
/\\begin{theorem}[^]*?\\label{thm-line}[^]*?\\end{theorem}/,
35+
/\\begin{theorem}[^]*?\\protect\\hypertarget{thm-line}{}\\label{thm-line}[^]*?\\end{theorem}/,
3636
/Theorem~\\ref{thm-line}/,
3737
];
3838

39+
const theoremRegexesNo = [
40+
/\\leavevmode\\vadjust pre{\\hypertarget{thm-line}{}}%/,
41+
];
42+
3943
testRender(allQmd.input, "latex", true, [
4044
ensureFileRegexMatches(allQmd.output.outputPath, [
4145
...simpleFigRegexes,
4246
...subFigRegexes,
4347
...simpleTableRegexes,
4448
...subTableRegexes,
4549
...theoremRegexes,
50+
], [
51+
...theoremRegexesNo,
4652
]),
4753
]);

0 commit comments

Comments
 (0)