aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-01-19 14:45:15 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-01-19 14:45:15 -0800
commit61f3db612cb0d84663499c6b9165f2a93fcc5e52 (patch)
tree01b3494a30dc0a6acc3f599409da3011a608be45 /src
parent3442df88bd8a4a923f87ccbba90c3f24898e9d83 (diff)
downloadpandoc-61f3db612cb0d84663499c6b9165f2a93fcc5e52.tar.gz
Parsing: Rewrote spaceChar for significant speedup in readers.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Parsing.hs2
1 files changed, 1 insertions, 1 deletions
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 ()