Removed incorrect entity conversion in dokuwiki writer (#386)

This commit is contained in:
claremacrae 2013-07-28 18:59:16 +01:00
parent 51b8ce49f1
commit b5f86a665d
2 changed files with 11 additions and 12 deletions

View file

@ -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

View file

@ -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]].
Heres a [[http://example.com/?foo=1&bar=2|link with an ampersand in the URL]].
Heres a link with an amersand in the link text: [[http://att.com/|AT&amp;T]].
Heres a link with an amersand in the link text: [[http://att.com/|AT&T]].
Heres an [[script?foo=1&bar=2|inline link]].