MediaWiki reader: allow HTML comment after row start.

Closes #8110.
This commit is contained in:
John MacFarlane 2022-07-28 11:27:27 -07:00
parent 5c3423f2e2
commit f637ccd3bf
2 changed files with 45 additions and 1 deletions

View file

@ -265,7 +265,10 @@ tableEnd = try $ guardColumnOne *> skipSpaces *> sym "|}"
rowsep :: PandocMonad m => MWParser m ()
rowsep = try $ guardColumnOne *> skipSpaces *> sym "|-" <*
many (char '-') <* optional parseAttrs <* blanklines
many (char '-') <* optional parseAttrs
<* skipSpaces
<* skipMany htmlComment
<* blanklines
cellsep :: PandocMonad m => MWParser m ()
cellsep = try $ do

41
test/command/8110.md Normal file
View file

@ -0,0 +1,41 @@
```
% pandoc -f mediawiki
{| class="wikitable"
! Header text
! Header text
! Header text
|-
| Example
| Example
| Example
|- <!-- This is a comment -->
| Example
| Example
| Example
|}
^D
<table>
<thead>
<tr class="header">
<th><p>Header text</p></th>
<th><p>Header text</p></th>
<th><p>Header text</p></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p>Example</p></td>
<td><p>Example</p></td>
<td><p>Example</p></td>
</tr>
<tr class="even">
<td><p>Example</p></td>
<td><p>Example</p></td>
<td><p>Example</p></td>
</tr>
</tbody>
</table>
```