mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-25 09:47:06 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user