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.
This commit is contained in:
John MacFarlane 2010-12-22 15:10:21 -08:00
parent 4ba3afbb4d
commit bbad129066

View file

@ -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