git.iko.soy/typeable/pandoc
on master help sign in
Allow pipe tables with no body rows.
33d328fJohn MacFarlane
src/Text/Pandoc/Readers/Markdown.hs+3−2
@@ -1341,9 +1341,10 @@ pipeTable :: MarkdownParser ([Alignment], [Double], F [Blocks], F [[Blocks]])
1341pipeTable = try $ do
1341pipeTable = try $ do
1342 nonindentSpaces
1342 nonindentSpaces
1343 lookAhead nonspaceChar
1343 lookAhead nonspaceChar
1344− (heads,(aligns, seplengths)) <- (,) <$> pipeTableRow <*> pipeBreak
1344+ ((heads, rawHead),(aligns, seplengths)) <- (,) <$>
1345+ withRaw pipeTableRow <*> pipeBreak
1345 (lines', rawRows) <- unzip <$> many (withRaw pipeTableRow)
1346 (lines', rawRows) <- unzip <$> many (withRaw pipeTableRow)
1346− let maxlength = maximum $ map length rawRows
1347+ let maxlength = maximum $ map length (rawHead : rawRows)
1347 numColumns <- getOption readerColumns
1348 numColumns <- getOption readerColumns
1348 let widths = if maxlength > numColumns
1349 let widths = if maxlength > numColumns
1349 then map (\len ->
1350 then map (\len ->