From 61cc983bea706eb4ce7cedcc61824f8dc39c226f Mon Sep 17 00:00:00 2001
From: Clare Macrae <github@cfmacrae.fastmail.co.uk>
Date: Wed, 2 Jul 2014 21:40:12 +0100
Subject: [PATCH] DokuWiki writer: Retain unknown RawBlock and RawInline text

This added \cite and \begin latex to the testuite output.
---
 src/Text/Pandoc/Writers/DokuWiki.hs | 4 ++--
 tests/writer.dokuwiki               | 8 ++++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs
index 8ea1841eb..621cc77dd 100644
--- a/src/Text/Pandoc/Writers/DokuWiki.hs
+++ b/src/Text/Pandoc/Writers/DokuWiki.hs
@@ -124,7 +124,7 @@ blockToDokuWiki opts (Para inlines) = do
 blockToDokuWiki _ (RawBlock f str)
   | f == Format "mediawiki" = return str
   | f == Format "html"      = return $ "<html>\n" ++ str ++ "</html>"
-  | otherwise               = return ""
+  | otherwise               = return str
 
 blockToDokuWiki _ HorizontalRule = return "\n----\n"
 
@@ -409,7 +409,7 @@ inlineToDokuWiki _ (Math _ str) = return $ "<math>" ++ str ++ "</math>"
 inlineToDokuWiki _ (RawInline f str)
   | f == Format "mediawiki" = return str
   | f == Format "html"      = return str
-  | otherwise               = return ""
+  | otherwise               = return str
 
 inlineToDokuWiki _ (LineBreak) = return "\\\\ "
 
diff --git a/tests/writer.dokuwiki b/tests/writer.dokuwiki
index b382c5120..dc23da1e2 100644
--- a/tests/writer.dokuwiki
+++ b/tests/writer.dokuwiki
@@ -424,7 +424,7 @@ Ellipses…and…and….
 
 ====== LaTeX ======
 
-  * 
+  * \cite[22-23]{smith.1899}
   * <math>2+2=4</math>
   * <math>x \in y</math>
   * <math>\alpha \wedge \omega</math>
@@ -442,7 +442,11 @@ These shouldn’t be math:
 
 Here’s a LaTeX table:
 
-
+\begin{tabular}{|l|l|}\hline
+Animal & Number \\ \hline
+Dog    & 2      \\
+Cat    & 1      \\ \hline
+\end{tabular}
 
 ----