aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/DokuWiki.hs7
-rw-r--r--tests/writer.dokuwiki16
2 files changed, 11 insertions, 12 deletions
diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs
index 6946f7722..c4a99edca 100644
--- a/src/Text/Pandoc/Writers/DokuWiki.hs
+++ b/src/Text/Pandoc/Writers/DokuWiki.hs
@@ -31,7 +31,6 @@ DokuWiki: <https://www.dokuwiki.org/dokuwiki>
-}
{-
- [ ] Don't convert & to &amp;
[ ] Don't generate <blockquote>...
[ ] Don't generate <pre>...
[ ] Implement definition lists
@@ -51,7 +50,7 @@ import Text.Pandoc.Options
import Text.Pandoc.Shared
import Text.Pandoc.Writers.Shared
import Text.Pandoc.Templates (renderTemplate')
-import Text.Pandoc.XML ( escapeStringForXML )
+import Text.Pandoc.XML ( escapeStringForXML ) -- TODO Remove this line
import Data.List ( intersect, intercalate )
import Network.URI ( isURI )
import Control.Monad.State
@@ -89,7 +88,7 @@ pandocToDokuWiki opts (Pandoc meta blocks) = do
else return main
-- | Escape special characters for DokuWiki.
-escapeString :: String -> String
+escapeString :: String -> String -- TODO Remove this
escapeString = escapeStringForXML
-- | Convert Pandoc block element to DokuWiki.
@@ -404,7 +403,7 @@ inlineToDokuWiki opts (Cite _ lst) = inlineListToDokuWiki opts lst
inlineToDokuWiki _ (Code _ str) =
return $ "<code>" ++ (escapeString str) ++ "</code>"
-inlineToDokuWiki _ (Str str) = return $ escapeString str
+inlineToDokuWiki _ (Str str) = return $ str
inlineToDokuWiki _ (Math _ str) = return $ "<math>" ++ str ++ "</math>"
-- note: str should NOT be escaped
diff --git a/tests/writer.dokuwiki b/tests/writer.dokuwiki
index 0d03ea8b3..742c9ca25 100644
--- a/tests/writer.dokuwiki
+++ b/tests/writer.dokuwiki
@@ -64,7 +64,7 @@ Nested block quotes:
</blockquote>
<blockquote>nested
</blockquote></blockquote>
-This should not be a block quote: 2 &gt; 1.
+This should not be a block quote: 2 > 1.
And a following paragraph.
@@ -501,15 +501,15 @@ Here is some unicode:
* set membership: ∈
* copyright: ©
-AT&amp;T has an ampersand in their name.
+AT&T has an ampersand in their name.
-AT&amp;T is another way to write it.
+AT&T is another way to write it.
-This &amp; that.
+This & that.
-4 &lt; 5.
+4 < 5.
-6 &gt; 5.
+6 > 5.
Backslash: \
@@ -531,7 +531,7 @@ Left paren: (
Right paren: )
-Greater-than: &gt;
+Greater-than: >
Hash: #
@@ -597,7 +597,7 @@ Foo [[url/|biz]].
Here’s a [[http://example.com/?foo=1&bar=2|link with an ampersand in the URL]].
-Here’s a link with an amersand in the link text: [[http://att.com/|AT&amp;T]].
+Here’s a link with an amersand in the link text: [[http://att.com/|AT&T]].
Here’s an [[script?foo=1&bar=2|inline link]].