From fa59e2ef28faf524d576f05eaa6c411856736ef3 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 2 Mar 2017 10:25:12 +0100 Subject: Markdown reader: when splitting pipe table cells, skip tex math. You might have a `|` character inside math. (Or for that matter something that the parser might mistake for raw HTML.) See #3481. --- src/Text/Pandoc/Readers/Markdown.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 80a1cd7a2..6c7f8362f 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1401,7 +1401,7 @@ pipeTableRow = try $ do skipMany spaceChar openPipe <- (True <$ char '|') <|> return False -- split into cells - let chunk = void (code <|> rawHtmlInline <|> escapedChar <|> rawLaTeXInline') + let chunk = void (code <|> math <|> rawHtmlInline <|> escapedChar <|> rawLaTeXInline') <|> void (noneOf "|\n\r") let cellContents = ((trim . snd) <$> withRaw (many chunk)) >>= parseFromString pipeTableCell -- cgit v1.2.3