From 244c4eee7487e386e3e6ff7cf78146385eef9d1f Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Tue, 1 Jul 2014 21:42:21 +0100 Subject: Remove stray
and
from DokuWiki output (#386) --- src/Text/Pandoc/Writers/DokuWiki.hs | 7 ++----- tests/writer.dokuwiki | 27 +++++++++------------------ 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs index ad68425ff..31057f09e 100644 --- a/src/Text/Pandoc/Writers/DokuWiki.hs +++ b/src/Text/Pandoc/Writers/DokuWiki.hs @@ -34,7 +34,6 @@ DokuWiki: [ ] Correct handling of Span [ ] Don't generate
... [ ] Don't generate lists using
    and
      - [ ] Don't generate
      [ ] Implement alignment of text in tables [ ] Implement comments [ ] Work through the Dokuwiki spec, and check I've not missed anything out @@ -47,7 +46,6 @@ import Text.Pandoc.Definition import Text.Pandoc.Options import Text.Pandoc.Shared import Text.Pandoc.Writers.Shared -import Text.Pandoc.Pretty (render) import Text.Pandoc.Templates (renderTemplate') import Data.List ( intersect, intercalate ) import Network.URI ( isURI ) @@ -97,10 +95,9 @@ blockToDokuWiki :: WriterOptions -- ^ Options blockToDokuWiki _ Null = return "" -blockToDokuWiki opts (Div attrs bs) = do +blockToDokuWiki opts (Div _attrs bs) = do contents <- blockListToDokuWiki opts bs - return $ render Nothing (tagWithAttrs "div" attrs) ++ "\n" ++ - contents ++ "\n" ++ "
      " + return $ contents ++ "\n" blockToDokuWiki opts (Plain inlines) = inlineListToDokuWiki opts inlines diff --git a/tests/writer.dokuwiki b/tests/writer.dokuwiki index c18e95128..3e47ee7ee 100644 --- a/tests/writer.dokuwiki +++ b/tests/writer.dokuwiki @@ -274,21 +274,16 @@ Blank line after term, indented marker, alternate markers: Simple block on one line: -
      foo -
      + And nested without indentation: -
      -
      -
      foo -
      -
      -
      + + bar -
      -
      + + Interpreted markdown in a table: @@ -309,9 +304,8 @@ And this is **strong** Here’s a simple block: -
      foo -
      + This should be a code block, though:
      @@ -322,13 +316,10 @@ As should this:
      foo
      Now, nested: -
      -
      -
      foo -
      -
      -
      + + + This should just be an HTML comment: -- cgit v1.2.3