diff options
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX/Table.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX/Table.hs b/src/Text/Pandoc/Readers/LaTeX/Table.hs index 2ea9caf58..7833da081 100644 --- a/src/Text/Pandoc/Readers/LaTeX/Table.hs +++ b/src/Text/Pandoc/Readers/LaTeX/Table.hs @@ -134,6 +134,11 @@ parseTableRow :: PandocMonad m -> LP m Row parseTableRow blocks inline envname prefsufs = do notFollowedBy (spaces *> end_ envname) + -- contexts that can contain & that is not colsep: + let canContainAmp (Tok _ (CtrlSeq "begin") _) = True + canContainAmp (Tok _ (CtrlSeq "verb") _) = True + canContainAmp (Tok _ (CtrlSeq "Verb") _) = True + canContainAmp _ = False -- add prefixes and suffixes in token stream: let celltoks (pref, suff) = do prefpos <- getPosition @@ -142,7 +147,7 @@ parseTableRow blocks inline envname prefsufs = do ((lookAhead (controlSeq "parbox") >> void blocks) -- #5711 <|> - (lookAhead (controlSeq "begin") >> void inline) + (lookAhead (satisfyTok canContainAmp) >> void inline) <|> (lookAhead (symbol '$') >> void inline)) <|> |