summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-03-02 10:25:12 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-03-02 10:25:12 +0100
commitfa59e2ef28faf524d576f05eaa6c411856736ef3 (patch)
tree2ad48e58e4d70a7c28132268dc8162a8839a86c1 /src
parentfe4311d5a1482ab2e0edfe78c556bf28fc50adf7 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs2
1 files changed, 1 insertions, 1 deletions
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