Markdown reader: Use take1WhileP for str.
This yields a small but measurable performance improvement.
This commit is contained in:
parent
db6e9de091
commit
cc5afbb834
1 changed files with 3 additions and 1 deletions
|
@ -1728,7 +1728,9 @@ nonEndline = satisfy (/='\n')
|
|||
|
||||
str :: PandocMonad m => MarkdownParser m (F Inlines)
|
||||
str = do
|
||||
result <- many1Char (alphaNum <|> try (char '.' <* notFollowedBy (char '.')))
|
||||
result <- mconcat <$> many1
|
||||
( take1WhileP isAlphaNum
|
||||
<|> "." <$ try (char '.' <* notFollowedBy (char '.')) )
|
||||
updateLastStrPos
|
||||
(do guardEnabled Ext_smart
|
||||
abbrevs <- getOption readerAbbreviations
|
||||
|
|
Loading…
Reference in a new issue