diff options
Diffstat (limited to 'src/Text/Pandoc/Readers/Markdown.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 0708690d4..69753c52a 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1186,7 +1186,11 @@ pipeTableHeaderPart = do -- Succeed only if current line contains a pipe. scanForPipe :: Parser [Char] st () -scanForPipe = lookAhead (manyTill (satisfy (/='\n')) (char '|')) >> return () +scanForPipe = do + inp <- getInput + case break (\c -> c == '\n' || c == '|') inp of + (_,'|':_) -> return () + _ -> mzero -- | Parse a table using 'headerParser', 'rowParser', -- 'lineParser', and 'footerParser'. Variant of the version in |