mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 03:06:30 +00:00
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
This commit is contained in:
@@ -478,19 +478,18 @@ regularKey = try $ do
|
||||
-- inline
|
||||
--
|
||||
|
||||
inline = choice [ superscript
|
||||
, subscript
|
||||
, escapedChar
|
||||
, link
|
||||
, image
|
||||
, hyphens
|
||||
inline = choice [ link
|
||||
, str
|
||||
, whitespace
|
||||
, endline
|
||||
, strong
|
||||
, emph
|
||||
, code
|
||||
, str
|
||||
, tabchar
|
||||
, whitespace
|
||||
, endline
|
||||
, 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user