From 4ed64835cb475f3da80ed7b729516c7a90891d94 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 9 Mar 2016 08:33:13 -0800 Subject: Markdown reader: don't cross line boundary parsing pipe table row. Previously an emph element could be parsed across the newline at the end of the pipe table row. I thought this would help with #2765, but it doesn't. --- src/Text/Pandoc/Readers/Markdown.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 587726084..0eeda0fee 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1372,7 +1372,13 @@ sepPipe = try $ do -- parse a row, also returning probable alignments for org-table cells pipeTableRow :: MarkdownParser (F [Blocks]) -pipeTableRow = do +pipeTableRow = try $ do + scanForPipe + raw <- anyLine + parseFromString pipeTableRow' (raw ++ "\n") + +pipeTableRow' :: MarkdownParser (F [Blocks]) +pipeTableRow' = do skipMany spaceChar openPipe <- (True <$ char '|') <|> return False let cell = mconcat <$> -- cgit v1.2.3