diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-29 20:22:24 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-08-29 20:22:24 +0000 |
commit | 2a37d8d30a3eb79e4fafe89d23de6d1f649ffacf (patch) | |
tree | c89d29699fa9a4b1f00b93da131167371c6af05c /src | |
parent | 015644b60e66b9075c924358a4a7f8ff30d21e40 (diff) | |
download | pandoc-2a37d8d30a3eb79e4fafe89d23de6d1f649ffacf.tar.gz |
Efficiency improvements to RST reader (more than doubled
speed):
+ removed tabchar
+ rearranged parsers in inline
git-svn-id: https://pandoc.googlecode.com/svn/trunk@958 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 6bc8c1197..91e6cc6c6 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -478,19 +478,18 @@ regularKey = try $ do -- inline -- -inline = choice [ superscript - , subscript - , escapedChar - , link - , image - , hyphens - , strong - , emph - , code +inline = choice [ link , str - , tabchar , whitespace , endline + , strong + , emph + , code + , image + , hyphens + , superscript + , subscript + , escapedChar , symbol ] <?> "inline" hyphens = try $ do @@ -530,8 +529,6 @@ subscript = interpreted "sub" >>= (return . Subscript) whitespace = many1 spaceChar >> return Space <?> "whitespace" -tabchar = tab >> return (Str "\t") - str = notFollowedBy' oneWordReference >> many1 (noneOf (specialChars ++ "\t\n ")) >>= return . Str |