summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/MediaWiki.hs1
-rw-r--r--test/command/9293.md29
2 files changed, 30 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs
index 57cdb71e4..0fe95004d 100644
--- a/src/Text/Pandoc/Readers/MediaWiki.hs
+++ b/src/Text/Pandoc/Readers/MediaWiki.hs
@@ -502,6 +502,7 @@ listItem c = try $ do
-- }}
-- * next list item
-- which seems to be valid mediawiki.
+-- Also multiline math: see #9293.
listChunk :: PandocMonad m => MWParser m Text
listChunk = template <|> (snd <$> withRaw math) <|> countChar 1 anyChar
diff --git a/test/command/9293.md b/test/command/9293.md
new file mode 100644
index 000000000..b9471b811
--- /dev/null
+++ b/test/command/9293.md
@@ -0,0 +1,29 @@
+```
+% pandoc -f mediawiki -t native
+* Linearity in the first argument:
+*:<math>\begin{align}
+\langle a \mathbf u, \mathbf v\rangle &= a \langle \mathbf u, \mathbf v\rangle. \\
+\langle \mathbf u + \mathbf v, \mathbf w\rangle &= \langle \mathbf u, \mathbf w\rangle+ \langle \mathbf v, \mathbf w\rangle.
+\end{align}</math>
+^D
+[ BulletList
+ [ [ Plain
+ [ Str "Linearity"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "first"
+ , Space
+ , Str "argument:"
+ ]
+ , Para
+ [ Math
+ DisplayMath
+ "\\begin{align}\n\\langle a \\mathbf u, \\mathbf v\\rangle &= a \\langle \\mathbf u, \\mathbf v\\rangle. \\\\\n\\langle \\mathbf u + \\mathbf v, \\mathbf w\\rangle &= \\langle \\mathbf u, \\mathbf w\\rangle+ \\langle \\mathbf v, \\mathbf w\\rangle.\n\\end{align}"
+ ]
+ ]
+ ]
+]
+```