From 2a4b987cc33995177b339f86c096a87b5abb1795 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 24 Jul 2012 09:08:54 -0700 Subject: More performance improvements on pipe tables. --- src/Text/Pandoc/Readers/Markdown.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index a6f3db806..fb8910583 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -913,7 +913,6 @@ pipeTable headless = tableWith (pipeTableHeader headless) pipeTableHeader :: Bool -- ^ Headerless table -> Parser [Char] ParserState ([[Block]], [Alignment], [Int]) pipeTableHeader headless = do - scanForPipe try $ do heads <- if headless then return $ repeat [] @@ -965,7 +964,7 @@ table = try $ do Table _ aligns widths heads lines' <- multilineTable False <|> simpleTable True <|> simpleTable False <|> multilineTable True <|> - pipeTable False <|> pipeTable True <|> + (scanForPipe >> (pipeTable False <|> pipeTable True)) <|> gridTable False <|> gridTable True "table" caption <- if null frontCaption then option [] tableCaption -- cgit v1.2.3