DokuWiki writer: Normalize to collapse adjacent raw HTML blocks.

This commit is contained in:
John MacFarlane 2014-07-13 15:48:01 -07:00
parent 15956fcac7
commit 0ba2f0b8f9
2 changed files with 1 additions and 31 deletions

View file

@ -57,7 +57,7 @@ data WriterState = WriterState {
-- | Convert Pandoc to DokuWiki.
writeDokuWiki :: WriterOptions -> Pandoc -> String
writeDokuWiki opts document =
evalState (pandocToDokuWiki opts document)
evalState (pandocToDokuWiki opts $ normalize document)
(WriterState { stNotes = False, stIndent = "", stUseTags = False })
-- | Return DokuWiki representation of document.

View file

@ -288,31 +288,19 @@ Interpreted markdown in a table:
<HTML>
<table>
</HTML>
<HTML>
<tr>
</HTML>
<HTML>
<td>
</HTML>
This is //emphasized//
<HTML>
</td>
</HTML>
<HTML>
<td>
</HTML>
And this is **strong**
<HTML>
</td>
</HTML>
<HTML>
</tr>
</HTML>
<HTML>
</table>
</HTML>
<HTML>
<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
</HTML>
Heres a simple block:
@ -345,8 +333,6 @@ Multiline:
Blah
Blah
-->
</HTML>
<HTML>
<!--
This is another comment.
-->
@ -366,29 +352,13 @@ Hrs:
<HTML>
<hr>
</HTML>
<HTML>
<hr />
</HTML>
<HTML>
<hr />
</HTML>
<HTML>
<hr>
</HTML>
<HTML>
<hr />
</HTML>
<HTML>
<hr />
</HTML>
<HTML>
<hr class="foo" id="bar" />
</HTML>
<HTML>
<hr class="foo" id="bar" />
</HTML>
<HTML>
<hr class="foo" id="bar">
</HTML>