Dokuwiki writer: More idiomatic code for escaping.
This commit is contained in:
parent
798c57d9b2
commit
fbf7cbfdc8
1 changed files with 4 additions and 2 deletions
|
@ -81,9 +81,11 @@ pandocToDokuWiki opts (Pandoc meta blocks) = do
|
|||
then return $ renderTemplate' (writerTemplate opts) context
|
||||
else return main
|
||||
|
||||
-- | Escape special characters for MediaWiki.
|
||||
-- | Escape special characters for DokuWiki.
|
||||
escapeString :: String -> String
|
||||
escapeString str = substitute "__" "%%__%%" ( substitute "**" "%%**%%" ( substitute "//" "%%//%%" str ) )
|
||||
escapeString = substitute "__" "%%__%%" .
|
||||
substitute "**" "%%**%%" .
|
||||
substitute "//" "%%//%%"
|
||||
|
||||
-- | Convert Pandoc block element to DokuWiki.
|
||||
blockToDokuWiki :: WriterOptions -- ^ Options
|
||||
|
|
Loading…
Reference in a new issue