mirror of
https://github.com/typst/typst
synced 2025-05-19 11:35:27 +08:00
test: add test for counter used in RTL grid layout
This commit is contained in:
parent
ef14e1e28d
commit
2d18ebe865
BIN
tests/ref/grid-rtl-counter.png
Normal file
BIN
tests/ref/grid-rtl-counter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 272 B |
@ -193,3 +193,23 @@
|
|||||||
),
|
),
|
||||||
..range(0, 10).map(i => ([\##i], table.cell(stroke: green)[123], table.cell(stroke: blue)[456], [789], [?], table.hline(start: 4, end: 5, stroke: red))).flatten()
|
..range(0, 10).map(i => ([\##i], table.cell(stroke: green)[123], table.cell(stroke: blue)[456], [789], [?], table.hline(start: 4, end: 5, stroke: red))).flatten()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
--- grid-rtl-counter ---
|
||||||
|
// Test interaction between RTL and counters
|
||||||
|
#set text(dir: rtl)
|
||||||
|
#let test = counter("test")
|
||||||
|
#grid(
|
||||||
|
columns: (1fr, 1fr),
|
||||||
|
inset: 5pt,
|
||||||
|
align: center,
|
||||||
|
[
|
||||||
|
a: // should produce 1
|
||||||
|
#test.step()
|
||||||
|
#context test.get().first()
|
||||||
|
],
|
||||||
|
[
|
||||||
|
b: // should produce 2
|
||||||
|
#test.step()
|
||||||
|
#context test.get().first()
|
||||||
|
],
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user