diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-12-22 15:10:21 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-12-22 15:10:21 -0800 |
commit | bbad12906632291d146a8ad634309a689c3b46af (patch) | |
tree | 792703fc7942f4344b3ac56a5f70e06a0936d3c5 | |
parent | 4ba3afbb4d55af23116f5882e18549ea1f228216 (diff) | |
download | pandoc-bbad12906632291d146a8ad634309a689c3b46af.tar.gz |
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.
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 8 |
1 files 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 |