aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2024-12-23 10:27:13 -0800
committerJohn MacFarlane <[email protected]>2024-12-23 10:27:13 -0800
commite122ca04b06b18eee2f8d3173c95cba2003234d5 (patch)
tree79e182f6cd4dc98c8f599d7155e1fb65ce9faeda
parent26ad26b7e69f7420566bda0f6be6a663235d67cb (diff)
MediaWiki reader: allow cells starting with `+`.
Closes #10491.
-rw-r--r--src/Text/Pandoc/Readers/MediaWiki.hs2
-rw-r--r--test/command/10491.md35
2 files changed, 36 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs
index 06e31cfab..c74a5a47b 100644
--- a/src/Text/Pandoc/Readers/MediaWiki.hs
+++ b/src/Text/Pandoc/Readers/MediaWiki.hs
@@ -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
diff --git a/test/command/10491.md b/test/command/10491.md
new file mode 100644
index 000000000..0647d5f17
--- /dev/null
+++ b/test/command/10491.md
@@ -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 |
+
+```