summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/LaTeX.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers/LaTeX.hs')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 9eb9eb2f9..5cd13fa1d 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -781,11 +781,10 @@ parseTableRow :: Int -- ^ number of columns
parseTableRow cols = try $ do
let amp = try $ spaces *> string "&"
let tableCellInline = notFollowedBy (amp <|> controlSeq "\\") >> inline
- cells' <- sepBy (spaces *> ((plain . trimInlines . mconcat) <$>
- many tableCellInline)) amp
+ cells' <- sepBy ((plain . trimInlines . mconcat) <$> many tableCellInline) amp
guard $ length cells' == cols
spaces
- try $ controlSeq "\\" <|> lookAhead (try $ controlSeq "end" >> string "{tabular}")
+ optional $ controlSeq "\\"
return cells'
parseTableHeader :: Int -- ^ number of columns