aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiziano Müller <tm@dev-zero.ch>2015-07-13 14:19:45 +0200
committerTiziano Müller <tm@dev-zero.ch>2015-07-13 14:19:48 +0200
commitf464e49142b68b0044c11c843259e586f65b17b0 (patch)
treee483f556b9390f2cbe477cb787f99814c9e6fb4c
parent2df3dfe88391f9e5a0ec4e10aff0abbf0c88bb0a (diff)
downloadpandoc-f464e49142b68b0044c11c843259e586f65b17b0.tar.gz
DokuWiki: write $..$ instead of <math>..</math>
MathJax seems currently to be the only maintained math rendering extension for DokuWiki and it uses $..$ instead of <math>..</math>.
-rw-r--r--src/Text/Pandoc/Writers/DokuWiki.hs2
-rw-r--r--tests/writer.dokuwiki14
2 files changed, 8 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs
index 7164c6e86..7ebe09db7 100644
--- a/src/Text/Pandoc/Writers/DokuWiki.hs
+++ b/src/Text/Pandoc/Writers/DokuWiki.hs
@@ -451,7 +451,7 @@ inlineToDokuWiki _ (Code _ str) =
inlineToDokuWiki _ (Str str) = return $ escapeString str
-inlineToDokuWiki _ (Math _ str) = return $ "<math>" ++ str ++ "</math>"
+inlineToDokuWiki _ (Math _ str) = return $ "$" ++ str ++ "$"
-- note: str should NOT be escaped
inlineToDokuWiki _ (RawInline f str)
diff --git a/tests/writer.dokuwiki b/tests/writer.dokuwiki
index e984d391e..fe1f8296a 100644
--- a/tests/writer.dokuwiki
+++ b/tests/writer.dokuwiki
@@ -454,13 +454,13 @@ Ellipses…and…and….
====== LaTeX ======
*
- * <math>2+2=4</math>
- * <math>x \in y</math>
- * <math>\alpha \wedge \omega</math>
- * <math>223</math>
- * <math>p</math>-Tree
- * Here’s some display math: <math>\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}</math>
- * Here’s one that has a line break in it: <math>\alpha + \omega \times x^2</math>.
+ * $2+2=4$
+ * $x \in y$
+ * $\alpha \wedge \omega$
+ * $223$
+ * $p$-Tree
+ * Here’s some display math: $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
+ * Here’s one that has a line break in it: $\alpha + \omega \times x^2$.
These shouldn’t be math: