mirror of
https://github.com/typst/typst
synced 2025-08-07 19:57:54 +08:00
Add test for HTML tables.
This commit is contained in:
parent
a94fd6e19e
commit
dc12c30434
10
tests/ref/html/basic-table.html
Normal file
10
tests/ref/html/basic-table.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<table><tr><td>The</td><td>first</td><td>row</td></tr><tr><td>Foo</td><td rowspan="2">Baz</td><td>Bar</td></tr><tr><td>1</td><td>2</td></tr><tr><td colspan="2">3</td><td>4</td></tr></table>
|
||||
</body>
|
||||
</html>
|
23
tests/suite/layout/grid/html.typ
Normal file
23
tests/suite/layout/grid/html.typ
Normal file
@ -0,0 +1,23 @@
|
||||
--- basic-table html ---
|
||||
#table(
|
||||
columns: 3,
|
||||
rows: 3,
|
||||
|
||||
table.header(
|
||||
[The],
|
||||
[first],
|
||||
[row],
|
||||
table.hline(stroke: red)
|
||||
),
|
||||
|
||||
table.cell(x: 1, rowspan: 2)[Baz],
|
||||
[Foo],
|
||||
[Bar],
|
||||
|
||||
[1],
|
||||
// Baz spans into the next cell
|
||||
[2],
|
||||
|
||||
table.cell(colspan: 2)[3],
|
||||
[4],
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user