From bbad12906632291d146a8ad634309a689c3b46af Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 22 Dec 2010 15:10:21 -0800 Subject: RST reader: recouped speed loss due to addition of --smart. This was achieved by rearranging the parsers in inline. Benchmarks went from 500ms to 307ms -- not quite back to the 279ms we had in 1.6, before supporting smart punctuation and footnotes, but close. --- src/Text/Pandoc/Readers/RST.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index e929e2b91..1b0365c72 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -709,8 +709,7 @@ table = gridTable False <|> simpleTable False <|> -- inline :: GenParser Char ParserState Inline -inline = choice [ smartPunctuation inline - , link +inline = choice [ link , str , whitespace , endline @@ -718,11 +717,12 @@ inline = choice [ smartPunctuation inline , emph , code , image - , hyphens , superscript , subscript - , escapedChar , note + , smartPunctuation inline + , hyphens + , escapedChar , symbol ] "inline" hyphens :: GenParser Char ParserState Inline -- cgit v1.2.3