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
This commit is contained in:
fiddlosopher
2007-08-29 20:22:24 +00:00
parent 015644b60e
commit 2a37d8d30a
+9 -12
View File
@@ -478,19 +478,18 @@ regularKey = try $ do
-- inline
--
inline = choice [ superscript
, subscript
, escapedChar
, link
, image
, hyphens
inline = choice [ link
, str
, whitespace
, endline
, strong
, emph
, code
, str
, tabchar
, whitespace
, endline
, 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