MediaWiki reader: fix indented tables with caption.

Closes #10390.
This commit is contained in:
John MacFarlane
2024-11-19 09:46:34 -08:00
parent 323b7e4d6a
commit fabfaabd81
2 changed files with 24 additions and 0 deletions
+1
View File
@@ -209,6 +209,7 @@ table = do
Just w -> fromMaybe 1.0 $ parseWidth w
Nothing -> 1.0
caption <- option mempty tableCaption
optional newline
optional rowsep
hasheader <- option False $ True <$ lookAhead (skipSpaces *> char '!')
(cellwidths,hdr) <- unzip <$> tableRow
+23
View File
@@ -0,0 +1,23 @@
```
% pandoc -f mediawiki
{| class="wikitable"
|+ Overview of basic table markup
! Key
|-
| Value
|}
^D
<table>
<caption>Overview of basic table markup</caption>
<thead>
<tr>
<th><p>Key</p></th>
</tr>
</thead>
<tbody>
<tr>
<td><p>Value</p></td>
</tr>
</tbody>
</table>
```