From f464e49142b68b0044c11c843259e586f65b17b0 Mon Sep 17 00:00:00 2001 From: Tiziano Müller Date: Mon, 13 Jul 2015 14:19:45 +0200 Subject: DokuWiki: write $..$ instead of .. MathJax seems currently to be the only maintained math rendering extension for DokuWiki and it uses $..$ instead of ... --- 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 $ "" ++ str ++ "" +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 ====== * - * 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. + * $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: -- cgit v1.2.3