From f464e49142b68b0044c11c843259e586f65b17b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tm@dev-zero.ch>
Date: Mon, 13 Jul 2015 14:19:45 +0200
Subject: [PATCH] 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>.
---
 src/Text/Pandoc/Writers/DokuWiki.hs |  2 +-
 tests/writer.dokuwiki               | 14 +++++++-------
 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: