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:
parent
fe4311d5a1
commit
fa59e2ef28
1 changed files with 1 additions and 1 deletions
|
@ -1401,7 +1401,7 @@ pipeTableRow = try $ do
|
||||||
skipMany spaceChar
|
skipMany spaceChar
|
||||||
openPipe <- (True <$ char '|') <|> return False
|
openPipe <- (True <$ char '|') <|> return False
|
||||||
-- split into cells
|
-- split into cells
|
||||||
let chunk = void (code <|> rawHtmlInline <|> escapedChar <|> rawLaTeXInline')
|
let chunk = void (code <|> math <|> rawHtmlInline <|> escapedChar <|> rawLaTeXInline')
|
||||||
<|> void (noneOf "|\n\r")
|
<|> void (noneOf "|\n\r")
|
||||||
let cellContents = ((trim . snd) <$> withRaw (many chunk)) >>=
|
let cellContents = ((trim . snd) <$> withRaw (many chunk)) >>=
|
||||||
parseFromString pipeTableCell
|
parseFromString pipeTableCell
|
||||||
|
|
Loading…
Reference in a new issue