@@ -2168,7 +2168,7 @@ parseTableRow envname prefsufs = do
2168 cells <- mapM (\ts -> setInput ts >> parseTableCell) rawcells
2168 cells <- mapM (\ts -> setInput ts >> parseTableCell) rawcells
2169 setInput oldInput
2169 setInput oldInput
2171− -- Because of table normalization performed by Text.Pandoc.Builder.table,
2171+ -- Because of table normalization performed by Text.Pandoc.Builder.table,
2172 -- we need to remove empty cells
2172 -- we need to remove empty cells
2173 return $ Row nullAttr $ filter (\c -> c /= emptyCell) cells
2173 return $ Row nullAttr $ filter (\c -> c /= emptyCell) cells
@@ -2176,9 +2176,9 @@ parseTableCell :: PandocMonad m => LP m Cell
2176parseTableCell = do
2176parseTableCell = do
2178 updateState $ \st -> st{ sInTableCell = True }
2178 updateState $ \st -> st{ sInTableCell = True }
2179− cell' <- ( multicolumnCell
2179+ cell' <- ( multicolumnCell
2180− <|> multirowCell
2180+ <|> multirowCell
2181− <|> parseSimpleCell
2181+ <|> parseSimpleCell
2182 <|> parseEmptyCell
2182 <|> parseEmptyCell
2184 updateState $ \st -> st{ sInTableCell = False }
2184 updateState $ \st -> st{ sInTableCell = False }
@@ -2186,7 +2186,7 @@ parseTableCell = do
2186 return cell'
2186 return cell'
2188 -- The parsing of empty cells is important in LaTeX, especially when dealing
2188 -- The parsing of empty cells is important in LaTeX, especially when dealing
2189− -- with multirow/multicolumn. See #6603.
2189+ -- with multirow/multicolumn. See #6603.
2190 parseEmptyCell = optional spaces >> return emptyCell <* optional spaces
2190 parseEmptyCell = optional spaces >> return emptyCell <* optional spaces
2192cellAlignment :: PandocMonad m => LP m Alignment
2192cellAlignment :: PandocMonad m => LP m Alignment
@@ -2213,7 +2213,7 @@ multirowCell = controlSeq "multirow" >> do
2213 -- However, everything except `nrows` and `text` make
2213 -- However, everything except `nrows` and `text` make
2214 -- sense in the context of the Pandoc AST
2214 -- sense in the context of the Pandoc AST
2215 _ <- optional $ symbol '[' *> cellAlignment <* symbol ']' -- vertical position
2215 _ <- optional $ symbol '[' *> cellAlignment <* symbol ']' -- vertical position
2216− nrows <- fmap (fromMaybe 1 . safeRead . untokenize) braced
2216+ nrows <- fmap (fromMaybe 1 . safeRead . untokenize) braced
2217 _ <- optional $ symbol '[' *> manyTill anyTok (symbol ']') -- bigstrut-related
2217 _ <- optional $ symbol '[' *> manyTill anyTok (symbol ']') -- bigstrut-related
2218 _ <- symbol '{' *> manyTill anyTok (symbol '}') -- Cell width
2218 _ <- symbol '{' *> manyTill anyTok (symbol '}') -- Cell width
2219 _ <- optional $ symbol '[' *> manyTill anyTok (symbol ']') -- Length used for fine-tuning
2219 _ <- optional $ symbol '[' *> manyTill anyTok (symbol ']') -- Length used for fine-tuning
@@ -2228,7 +2228,7 @@ multicolumnCell = controlSeq "multicolumn" >> do
2228 let singleCell = do
2228 let singleCell = do
2229 content <- plainify <$> blocks
2229 content <- plainify <$> blocks
2230 return $ cell alignment (RowSpan 1) (ColSpan span') content
2230 return $ cell alignment (RowSpan 1) (ColSpan span') content
2232 -- Two possible contents: either a \multirow cell, or content.
2232 -- Two possible contents: either a \multirow cell, or content.
2233 -- E.g. \multicol{1}{c}{\multirow{2}{1em}{content}}
2233 -- E.g. \multicol{1}{c}{\multirow{2}{1em}{content}}
2234 -- Note that a \multirow cell can be nested in a \multicolumn,
2234 -- Note that a \multirow cell can be nested in a \multicolumn,