Skip to content

Commit

Permalink
Make the table parser skip non-table inputs faster
Browse files Browse the repository at this point in the history
This restores and even improves the performance characteristics.
  • Loading branch information
mrkkrp committed Jan 20, 2018
1 parent 3fed8fb commit 4196ffa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Text/MMark/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ pReferenceDef = do
pTable :: BParser (Block Isp)
pTable = do
(n, headerRow) <- try $ do
option False (T.any (== '|') <$> nonEmptyLine) >>= guard
let pipe' = option False (True <$ pipe)
l <- pipe'
headerRow <- NE.sepBy1 cell (try (pipe <* notFollowedBy eol))
Expand Down

0 comments on commit 4196ffa

Please sign in to comment.