From 2a37d8d30a3eb79e4fafe89d23de6d1f649ffacf Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Wed, 29 Aug 2007 20:22:24 +0000 Subject: 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 --- src/Text/Pandoc/Readers/RST.hs | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/Text/Pandoc/Readers') 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 -- cgit v1.2.3