Skip to content

Commit

Permalink
MediaWiki reader: allow cells starting with +.
Browse files Browse the repository at this point in the history
Closes #10491.
  • Loading branch information
jgm committed Dec 23, 2024
1 parent 26ad26b commit e122ca0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Text/Pandoc/Readers/MediaWiki.hs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ cellsep = try $ do
skipMany spaceChar
c <- oneOf "|!"
when (col > 1) $ void $ char c
notFollowedBy (oneOf "-}+")
notFollowedBy (oneOf "-}")
attribs <- option [] (parseAttrs <* skipMany spaceChar <* char '|')
skipMany spaceChar
pure attribs
Expand Down
35 changes: 35 additions & 0 deletions test/command/10491.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
```
% pandoc -f mediawiki -t gfm
{| class="wikitable"
|-
!
!0
!1
!2
!3
!4
!5
!6
!7
|-
!+0
|q||p||z||r||y||9||x||8
|-
!+8
|g||f||2||t||v||d||w||0
|-
!+16
|s||3||j||n||5||4||k||h
|-
!+24
|c||e||6||m||u||a||7||l
|}
^D
| | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|-----|-----|-----|-----|-----|-----|-----|-----|-----|
| +0 | q | p | z | r | y | 9 | x | 8 |
| +8 | g | f | 2 | t | v | d | w | 0 |
| +16 | s | 3 | j | n | 5 | 4 | k | h |
| +24 | c | e | 6 | m | u | a | 7 | l |
```

0 comments on commit e122ca0

Please sign in to comment.