diff --git a/README b/README index 8faccea69..754f393ee 100644 --- a/README +++ b/README @@ -2254,9 +2254,10 @@ legal (though ugly) pipe table: The cells of pipe tables cannot contain block elements like paragraphs and lists, and cannot span multiple lines. If a pipe table contains a -row that is wider than the column width (see `--columns`), then the cell -contents will wrap, with the relative cell widths determined by the widths -of the separator lines. +row whose printable content is wider than the column width (see +`--columns`), then the cell contents will wrap, with the +relative cell widths determined by the widths of the separator +lines. Note: pandoc also recognizes pipe tables of the following form, as can be produced by Emacs' orgtbl-mode: diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 64cd817ba..2d222176c 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1341,10 +1341,10 @@ pipeTable :: MarkdownParser ([Alignment], [Double], F [Blocks], F [[Blocks]]) pipeTable = try $ do nonindentSpaces lookAhead nonspaceChar - ((heads, rawHead),(aligns, seplengths)) <- (,) <$> - withRaw pipeTableRow <*> pipeBreak - (lines', rawRows) <- unzip <$> many (withRaw pipeTableRow) - let maxlength = maximum $ map length (rawHead : rawRows) + (heads,(aligns, seplengths)) <- (,) <$> pipeTableRow <*> pipeBreak + lines' <- many pipeTableRow + let maxlength = maximum $ + map (\x -> length . stringify $ runF x def) (heads : lines') numColumns <- getOption readerColumns let widths = if maxlength > numColumns then map (\len ->