From 61f3db612cb0d84663499c6b9165f2a93fcc5e52 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 19 Jan 2011 14:45:15 -0800 Subject: Parsing: Rewrote spaceChar for significant speedup in readers. --- src/Text/Pandoc/Parsing.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index ce74a4dde..e283c209d 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -120,7 +120,7 @@ oneOfStrings listOfStrings = choice $ map (try . string) listOfStrings -- | Parses a space or tab. spaceChar :: CharParser st Char -spaceChar = char ' ' <|> char '\t' +spaceChar = satisfy $ \c -> c == ' ' || c == '\t' -- | Skips zero or more spaces or tabs. skipSpaces :: GenParser Char st () -- cgit v1.2.3