git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: allow valign argument in tables
1e3ef0eMathias Schenner
src/Text/Pandoc/Readers/LaTeX.hs+1−1
@@ -1314,7 +1314,7 @@ parseTableRow cols = try $ do
1314simpTable :: Bool -> LP Blocks
1314simpTable :: Bool -> LP Blocks
1315simpTable hasWidthParameter = try $ do
1315simpTable hasWidthParameter = try $ do
1316 when hasWidthParameter $ () <$ (spaces >> tok)
1316 when hasWidthParameter $ () <$ (spaces >> tok)
1317− spaces
1317+ skipopts
1318 aligns <- parseAligns
1318 aligns <- parseAligns
1319 let cols = length aligns
1319 let cols = length aligns
1320 optional hline
1320 optional hline
tests/Tests/Readers/LaTeX.hs+3
@@ -91,6 +91,9 @@ tests = [ testGroup "basic"
91 , "Table with empty column separators" =:
91 , "Table with empty column separators" =:
92 "\\begin{tabular}{@{}r@{}l}One & Two\\\\ \\end{tabular}" =?>
92 "\\begin{tabular}{@{}r@{}l}One & Two\\\\ \\end{tabular}" =?>
93 simpleTable' [AlignRight,AlignLeft] [[plain "One", plain "Two"]]
93 simpleTable' [AlignRight,AlignLeft] [[plain "One", plain "Two"]]
94+ , "Table with vertical alignment argument" =:
95+ "\\begin{tabular}[t]{r|r}One & Two\\\\ \\end{tabular}" =?>
96+ simpleTable' [AlignRight,AlignRight] [[plain "One", plain "Two"]]
94 ]
97 ]
95
98
96 , testGroup "citations"
99 , testGroup "citations"