git.iko.soy/typeable/pandoc
on master help sign in
Stop plain text ** and __ becoming formatting in dokuwiki writer (#386)
commit288329044a63331658079aa9db57b46fe204b6b9 authorclaremacrae <github@cfmacrae.fastmail.co.uk> dateSun 18 Aug 2013, 09:15 (13 years ago) parentb5b622f
2 files changed+2−2
src/Text/Pandoc/Writers/DokuWiki.hs+1−1 tests/dokuwiki-writer.dokuwiki+1−1
src/Text/Pandoc/Writers/DokuWiki.hs+1−1
@@ -87,7 +87,7 @@ pandocToDokuWiki opts (Pandoc meta blocks) = do
8787
8888-- | Escape special characters for MediaWiki.
8989escapeString :: String -> String
90−escapeString str = substitute "//" "%%//%%" str
90+escapeString str = substitute "__" "%%__%%" ( substitute "**" "%%**%%" ( substitute "//" "%%//%%" str ) )
9191
9292-- | Convert Pandoc block element to DokuWiki.
9393blockToDokuWiki :: WriterOptions -- ^ Options
tests/dokuwiki-writer.dokuwiki+1−1
@@ -1,3 +1,3 @@
1−hello %%//%% world ** from __ me
1+hello %%//%% world %%**%% from %%__%% me
22
33''%%hello // world ** from __ me%%''