Skip to content

Commit 728b166

Browse files
Fix tbl-column-margin test for Windows CI
Use hyphen-free marker text (TblColMarginCap, Alpha, BODYTEXT) to avoid Typst/pdftotext mangling hyphens differently across platforms.
1 parent b2b7951 commit 728b166

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

tests/docs/smoke-all/typst/margin-layout/tbl-column-margin.qmd

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,22 @@ _quarto:
1414
- ['#notefigure\(', 'kind: "quarto-float-tbl"']
1515
- []
1616
ensurePdfRegexMatches:
17-
# Typst drops hyphens in margin text, so use optional hyphens in patterns
18-
- ['Table 1', 'TBL.COL.MARGIN.?CAP', 'TBL.MARGIN.?MARKER']
17+
- ['Table 1', 'TblColMarginCap', 'Alpha']
1918
- []
2019
ensurePdfTextPositions:
2120
- # Table text should be in the margin, right of body text
22-
- subject: "Row2"
21+
- subject: "Alpha"
2322
relation: rightOf
24-
object: "BODY-TEXT-MARKER"
23+
object: "BODYTEXT"
2524
- []
2625
noErrors: default
2726
---
2827

29-
BODY-TEXT-MARKER: This tests the document-level `tbl-column: margin` option. Tables should go to the margin; figures should stay in the body.
28+
BODYTEXT: This tests the document-level `tbl-column: margin` option. Tables should go to the margin; figures should stay in the body.
3029

3130
```{r}
3231
#| label: fig-tc-test
33-
#| fig-cap: "FIG-BODY-CAP"
32+
#| fig-cap: "FigBodyCap"
3433
#| echo: false
3534
library(ggplot2)
3635
ggplot(mtcars, aes(x = wt, y = mpg)) +
@@ -40,10 +39,10 @@ ggplot(mtcars, aes(x = wt, y = mpg)) +
4039

4140
```{r}
4241
#| label: tbl-tc-test
43-
#| tbl-cap: "TBL-COL-MARGIN-CAP"
42+
#| tbl-cap: "TblColMarginCap"
4443
#| echo: false
4544
knitr::kable(
46-
data.frame(Item = c("TBL-MARGIN-MARKER", "Row2"), Value = c(10, 20))
45+
data.frame(Item = c("Alpha", "Beta"), Value = c(10, 20))
4746
)
4847
```
4948

0 commit comments

Comments
 (0)