LaTeX reader: properly handle booktabs lines.

Lines aren't part of the pandoc table model, but we can just
ignore them.

Closes #2307.
This commit is contained in:
John MacFarlane 2015-07-21 10:26:29 -07:00
parent 7120df9dad
commit f6ad9e263f

View file

@ -1287,7 +1287,16 @@ parseAligns = try $ do
return aligns'
hline :: LP ()
hline = () <$ try (spaces' *> controlSeq "hline" <* spaces')
hline = try $ do
spaces'
controlSeq "hline" <|>
-- booktabs rules:
controlSeq "toprule" <|>
controlSeq "bottomrule" <|>
controlSeq "midrule"
spaces'
optional $ bracketed (many1 (satisfy (/=']')))
return ()
lbreak :: LP ()
lbreak = () <$ try (spaces' *> controlSeq "\\" <* spaces')