summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtyom Kazak <yom@artyom.me>2014-08-03 13:25:11 +0400
committerArtyom Kazak <yom@artyom.me>2014-08-04 19:58:25 +0400
commiteb88444452c763b059cc83dcc2a691652d8eb842 (patch)
tree2dc54553a16c6d3fc6636b4e482a2e95aec213b9
parente51a2cedf9c46bd45143c4d896ac61d317cf0ebf (diff)
Remove redundant isHexDigit function.
-rw-r--r--src/Text/Pandoc/Readers/RST.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs
index b7bc83e86..e5eccb116 100644
--- a/src/Text/Pandoc/Readers/RST.hs
+++ b/src/Text/Pandoc/Readers/RST.hs
@@ -47,7 +47,7 @@ import Text.Pandoc.Builder (Inlines, Blocks, trimInlines, (<>))
import qualified Text.Pandoc.Builder as B
import Data.Monoid (mconcat, mempty)
import Data.Sequence (viewr, ViewR(..))
-import Data.Char (toLower)
+import Data.Char (toLower, isHexDigit)
-- | Parse reStructuredText string and return Pandoc document.
readRST :: ReaderOptions -- ^ Reader options
@@ -656,9 +656,6 @@ extractUnicodeChar s = maybe Nothing (\c -> Just (c,rest)) mbc
where (ds,rest) = span isHexDigit s
mbc = safeRead ('\'':'\\':'x':ds ++ "'")
-isHexDigit :: Char -> Bool
-isHexDigit c = c `elem` "0123456789ABCDEFabcdef"
-
extractCaption :: RSTParser (Inlines, Blocks)
extractCaption = do
capt <- trimInlines . mconcat <$> many inline