git.iko.soy/typeable/pandoc
on master help sign in
DokuWiki writer: Retain unknown RawBlock and RawInline text

This added \cite and \begin latex to the testuite output.

commit61cc983bea706eb4ce7cedcc61824f8dc39c226f authorClare Macrae <github@cfmacrae.fastmail.co.uk> dateWed 2 Jul 2014, 21:40 (12 years ago) parentd234157
2 files changed+8−4
src/Text/Pandoc/Writers/DokuWiki.hs+2−2 tests/writer.dokuwiki+6−2
src/Text/Pandoc/Writers/DokuWiki.hs+2−2
@@ -124,7 +124,7 @@ blockToDokuWiki opts (Para inlines) = do
124124blockToDokuWiki _ (RawBlock f str)
125125 | f == Format "mediawiki" = return str
126126 | f == Format "html" = return $ "<html>\n" ++ str ++ "</html>"
127− | otherwise = return ""
127+ | otherwise = return str
128128
129129blockToDokuWiki _ HorizontalRule = return "\n----\n"
130130
@@ -409,7 +409,7 @@ inlineToDokuWiki _ (Math _ str) = return $ "<math>" ++ str ++ "</math>"
409409inlineToDokuWiki _ (RawInline f str)
410410 | f == Format "mediawiki" = return str
411411 | f == Format "html" = return str
412− | otherwise = return ""
412+ | otherwise = return str
413413
414414inlineToDokuWiki _ (LineBreak) = return "\\\\ "
415415
tests/writer.dokuwiki+6−2
@@ -424,7 +424,7 @@ Ellipses…and…and….
424424
425425====== LaTeX ======
426426
427− *
427+ * \cite[22-23]{smith.1899}
428428 * <math>2+2=4</math>
429429 * <math>x \in y</math>
430430 * <math>\alpha \wedge \omega</math>
@@ -442,7 +442,11 @@ These shouldn’t be math:
442442
443443Here’s a LaTeX table:
444444
445−
445+\begin{tabular}{|l|l|}\hline
446+Animal & Number \\ \hline
447+Dog & 2 \\
448+Cat & 1 \\ \hline
449+\end{tabular}
446450
447451----
448452