git.iko.soy/typeable/pandoc
on master help sign in
DokuWiki writer: Retain unknown RawBlock and RawInline text
61cc983Clare Macrae
src/Text/Pandoc/Writers/DokuWiki.hs+2−2
@@ -124,7 +124,7 @@ blockToDokuWiki opts (Para inlines) = do
124blockToDokuWiki _ (RawBlock f str)
124blockToDokuWiki _ (RawBlock f str)
125 | f == Format "mediawiki" = return str
125 | f == Format "mediawiki" = return str
126 | f == Format "html" = return $ "<html>\n" ++ str ++ "</html>"
126 | f == Format "html" = return $ "<html>\n" ++ str ++ "</html>"
127− | otherwise = return ""
127+ | otherwise = return str
128
128
129blockToDokuWiki _ HorizontalRule = return "\n----\n"
129blockToDokuWiki _ HorizontalRule = return "\n----\n"
130
130
@@ -409,7 +409,7 @@ inlineToDokuWiki _ (Math _ str) = return $ "<math>" ++ str ++ "</math>"
409inlineToDokuWiki _ (RawInline f str)
409inlineToDokuWiki _ (RawInline f str)
410 | f == Format "mediawiki" = return str
410 | f == Format "mediawiki" = return str
411 | f == Format "html" = return str
411 | f == Format "html" = return str
412− | otherwise = return ""
412+ | otherwise = return str
413
413
414inlineToDokuWiki _ (LineBreak) = return "\\\\ "
414inlineToDokuWiki _ (LineBreak) = return "\\\\ "
415
415
tests/writer.dokuwiki+6−2
@@ -424,7 +424,7 @@ Ellipses…and…and….
424
424
425====== LaTeX ======
425====== LaTeX ======
426
426
427− *
427+ * \cite[22-23]{smith.1899}
428 * <math>2+2=4</math>
428 * <math>2+2=4</math>
429 * <math>x \in y</math>
429 * <math>x \in y</math>
430 * <math>\alpha \wedge \omega</math>
430 * <math>\alpha \wedge \omega</math>
@@ -442,7 +442,11 @@ These shouldn’t be math:
442
442
443Here’s a LaTeX table:
443Here’s a LaTeX table:
444
444
445−
445+\begin{tabular}{|l|l|}\hline
446+Animal & Number \\ \hline
447+Dog & 2 \\
448+Cat & 1 \\ \hline
449+\end{tabular}
446
450
447----
451----
448
452