git.iko.soy/typeable/pandoc
on master help sign in
Efficiency improvements to RST reader (more than doubled
2a37d8dfiddlosopher
src/Text/Pandoc/Readers/RST.hs+9−12
@@ -478,19 +478,18 @@ regularKey = try $ do
478 -- inline
478 -- inline
479 --
479 --
480
480
481−inline = choice [ superscript
481+inline = choice [ link
482− , subscript
483− , escapedChar
484− , link
485− , image
486− , hyphens
487− , strong
488− , emph
489− , code
490 , str
482 , str
491− , tabchar
492 , whitespace
483 , whitespace
493 , endline
484 , endline
485+ , strong
486+ , emph
487+ , code
488+ , image
489+ , hyphens
490+ , superscript
491+ , subscript
492+ , escapedChar
494 , symbol ] <?> "inline"
493 , symbol ] <?> "inline"
495
494
496hyphens = try $ do
495hyphens = try $ do
@@ -530,8 +529,6 @@ subscript = interpreted "sub" >>= (return . Subscript)
530
529
531whitespace = many1 spaceChar >> return Space <?> "whitespace"
530whitespace = many1 spaceChar >> return Space <?> "whitespace"
532
531
533−tabchar = tab >> return (Str "\t")
534−
535str = notFollowedBy' oneWordReference >>
532str = notFollowedBy' oneWordReference >>
536 many1 (noneOf (specialChars ++ "\t\n ")) >>= return . Str
533 many1 (noneOf (specialChars ++ "\t\n ")) >>= return . Str
537
534