aboutsummaryrefslogtreecommitdiff
path: root/test/command
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2023-08-05 19:43:14 -0700
committerJohn MacFarlane <[email protected]>2023-08-05 23:00:14 -0700
commite87addb58f48016e921d5da916d2b0c2675888db (patch)
treea812bd86a1401f8e4b43e11ae4569fe25c263447 /test/command
parent0beab6345f86d94414f87bb4192b54157a424785 (diff)
HTML reader: properly calculate RowHeadColumns.
The previous algorithm did not handle rowspans; this one does. Closes #8984.
Diffstat (limited to 'test/command')
-rw-r--r--test/command/8984.md54
1 files changed, 54 insertions, 0 deletions
diff --git a/test/command/8984.md b/test/command/8984.md
index ff8b7172f..5dc9519be 100644
--- a/test/command/8984.md
+++ b/test/command/8984.md
@@ -66,3 +66,57 @@
]
```
+
+```
+% pandoc -f html -t native
+<table>
+<tr>
+<th rowspan="2">Heading</th>
+<td>content</td>
+</tr>
+<tr>
+<td>content2</td>
+</tr>
+</table>
+^D
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 1)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 2)
+ (ColSpan 1)
+ [ Plain [ Str "Heading" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "content" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "content2" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
+
+```