diff options
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/DokuWiki.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs index a38a54953..4e7e79441 100644 --- a/src/Text/Pandoc/Writers/DokuWiki.hs +++ b/src/Text/Pandoc/Writers/DokuWiki.hs @@ -87,8 +87,7 @@ pandocToDokuWiki opts (Pandoc meta blocks) = do -- | Escape special characters for MediaWiki. escapeString :: String -> String --- The spaces around // are to prevent touching in URLs inside inline code blocks -escapeString str = substitute " // " " %%//%% " str +escapeString str = substitute "//" "%%//%%" str -- | Convert Pandoc block element to DokuWiki. blockToDokuWiki :: WriterOptions -- ^ Options @@ -423,7 +422,7 @@ inlineToDokuWiki _ (Code _ str) = -- any formatting inside inlined code blocks would be lost, or presented incorrectly. return $ "''%%" ++ str ++ "%%''" -inlineToDokuWiki _ (Str str) = return $ str +inlineToDokuWiki _ (Str str) = return $ escapeString str inlineToDokuWiki _ (Math _ str) = return $ "<math>" ++ str ++ "</math>" -- note: str should NOT be escaped |