diff options
| -rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 2 | ||||
| -rw-r--r-- | test/Tests/Readers/LaTeX.hs | 7 | 
2 files changed, 9 insertions, 0 deletions
| diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index af00813b6..9ab4b3cb8 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -2387,9 +2387,11 @@ parseTableRow envname prefsufs = do  parseTableCell :: PandocMonad m => LP m Cell  parseTableCell = do +  spaces    updateState $ \st -> st{ sInTableCell = True }    cell' <- parseMultiCell <|> parseSimpleCell    updateState $ \st -> st{ sInTableCell = False } +  spaces    return cell'  cellAlignment :: PandocMonad m => LP m Alignment diff --git a/test/Tests/Readers/LaTeX.hs b/test/Tests/Readers/LaTeX.hs index 74906fab4..a8d969659 100644 --- a/test/Tests/Readers/LaTeX.hs +++ b/test/Tests/Readers/LaTeX.hs @@ -148,6 +148,13 @@ tests = [ testGroup "tokenization"                                    , simpleCell (plain "Two")                                    ]                     ] +          , "table with multicolumn item (#6596)" =: +            "\\begin{tabular}{l c r}One & \\multicolumn{2}{c}{Two} & \\\\ \\end{tabular}" =?> +            table' [AlignLeft, AlignCenter, AlignRight] +                   [ Row nullAttr [ simpleCell (plain "One") +                                  , cell AlignCenter (RowSpan 1) (ColSpan 2) (plain "Two") +                                  ] +                   ]            , "Table with multirow item" =:              T.unlines ["\\begin{tabular}{c}"                        ,"\\multirow{2}{c}{One}\\\\Two\\\\" | 
