From 1121e8738b3d2a60c5762be03a2f6b33adae77ab Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Mon, 22 Jan 2007 22:52:39 +0000 Subject: Removed 'gsub' entirely and replaced its uses with 'substitute'. git-svn-id: https://pandoc.googlecode.com/svn/trunk@501 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/HTML.hs | 2 +- src/Text/Pandoc/Writers/Markdown.hs | 2 +- src/Text/Pandoc/Writers/RTF.hs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index d38a57556..5465e125d 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -87,7 +87,7 @@ obfuscateLink opts txt src = src' = map toLower src in case (matchRegex emailRegex src') of (Just [name, domain]) -> - let domain' = gsub "\\." " dot " domain + let domain' = substitute "." " dot " domain at' = obfuscateChar '@' in let linkText = if src' == ("mailto:" ++ text') then "e" diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 0e7704510..297f2dc36 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -55,7 +55,7 @@ escapeString = backslashEscape "`<\\*_^" -- | Escape embedded \" in link title. escapeLinkTitle :: String -> String -escapeLinkTitle = gsub "\"" "\\\\\"" +escapeLinkTitle = substitute "\"" "\\\"" -- | Take list of inline elements and return wrapped doc. wrappedMarkdown :: [Inline] -> Doc diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs index b53e39cb2..86991368b 100644 --- a/src/Text/Pandoc/Writers/RTF.hs +++ b/src/Text/Pandoc/Writers/RTF.hs @@ -59,7 +59,7 @@ handleUnicode (c:cs) = if (ord c) > 127 else c:(handleUnicode cs) escapeSpecial = backslashEscape "{\\}" -escapeTab = gsub "\\\\t" "\\\\tab " +escapeTab = substitute "\\t" "\\tab " -- | Escape strings as needed for rich text format. stringToRTF :: String -> String -- cgit v1.2.3