git.iko.soy/typeable/pandoc
on master help sign in
DokuWiki writer: Normalize to collapse adjacent raw HTML blocks.
commit0ba2f0b8f9002a53351716991509fc7621fa8272 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 13 Jul 2014, 15:48 (12 years ago) parent15956fc
2 files changed+1−31
src/Text/Pandoc/Writers/DokuWiki.hs+1−1 tests/writer.dokuwiki−30
src/Text/Pandoc/Writers/DokuWiki.hs+1−1
@@ -57,7 +57,7 @@ data WriterState = WriterState {
5757-- | Convert Pandoc to DokuWiki.
5858writeDokuWiki :: WriterOptions -> Pandoc -> String
5959writeDokuWiki opts document =
60− evalState (pandocToDokuWiki opts document)
60+ evalState (pandocToDokuWiki opts $ normalize document)
6161 (WriterState { stNotes = False, stIndent = "", stUseTags = False })
6262
6363-- | Return DokuWiki representation of document.
tests/writer.dokuwiki−30
@@ -288,31 +288,19 @@ Interpreted markdown in a table:
288288
289289<HTML>
290290<table>
291−</HTML>
292−<HTML>
293291<tr>
294−</HTML>
295−<HTML>
296292<td>
297293</HTML>
298294This is //emphasized//
299295<HTML>
300296</td>
301−</HTML>
302−<HTML>
303297<td>
304298</HTML>
305299And this is **strong**
306300<HTML>
307301</td>
308−</HTML>
309−<HTML>
310302</tr>
311−</HTML>
312−<HTML>
313303</table>
314−</HTML>
315−<HTML>
316304<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
317305</HTML>
318306Here’s a simple block:
@@ -345,8 +333,6 @@ Multiline:
345333Blah
346334Blah
347335-->
348−</HTML>
349−<HTML>
350336<!--
351337 This is another comment.
352338-->
@@ -366,29 +352,13 @@ Hr’s:
366352
367353<HTML>
368354<hr>
369−</HTML>
370−<HTML>
371355<hr />
372−</HTML>
373−<HTML>
374356<hr />
375−</HTML>
376−<HTML>
377357<hr>
378−</HTML>
379−<HTML>
380358<hr />
381−</HTML>
382−<HTML>
383359<hr />
384−</HTML>
385−<HTML>
386360<hr class="foo" id="bar" />
387−</HTML>
388−<HTML>
389361<hr class="foo" id="bar" />
390−</HTML>
391−<HTML>
392362<hr class="foo" id="bar">
393363</HTML>
394364