@@ -553,8 +553,13 @@ blockToMarkdown' opts t@(Table caption aligns widths headers rows) = do
553 else blankline $$ (": " <> caption') $$ blankline
553 else blankline $$ (": " <> caption') $$ blankline
554 let isLineBreak LineBreak = Any True
554 let isLineBreak LineBreak = Any True
555 isLineBreak _ = Any False
555 isLineBreak _ = Any False
556− let isSimple = all (==0) widths &&
557− not ( getAny (query isLineBreak (headers:rows)) )
556+ let hasLineBreak = getAny . query isLineBreak
557+ let isSimpleCell [Plain ils] = not (hasLineBreak ils)
558+ isSimpleCell [Para ils ] = not (hasLineBreak ils)
559+ isSimpleCell [] = True
560+ isSimpleCell _ = False
561+ let hasSimpleCells = all isSimpleCell (concat (headers:rows))
562+ let isSimple = hasSimpleCells && all (==0) widths
558 let isPlainBlock (Plain _) = True
563 let isPlainBlock (Plain _) = True
559 isPlainBlock _ = False
564 isPlainBlock _ = False
560 let hasBlocks = not (all isPlainBlock $ concat . concat $ headers:rows)
565 let hasBlocks = not (all isPlainBlock $ concat . concat $ headers:rows)
@@ -589,6 +594,9 @@ blockToMarkdown' opts t@(Table caption aligns widths headers rows) = do
589 | isEnabled Ext_raw_html opts -> fmap (id,) $
594 | isEnabled Ext_raw_html opts -> fmap (id,) $
590 (text . T.unpack) <$>
595 (text . T.unpack) <$>
591 (writeHtml5String def $ Pandoc nullMeta [t])
596 (writeHtml5String def $ Pandoc nullMeta [t])
598+ isEnabled Ext_pipe_tables opts -> fmap (id,) $
599+ pipeTable (all null headers) aligns' rawHeaders rawRows
592 | otherwise -> return $ (id, text "[TABLE]")
600 | otherwise -> return $ (id, text "[TABLE]")
593 return $ nst $ tbl $$ caption'' $$ blankline
601 return $ nst $ tbl $$ caption'' $$ blankline
594blockToMarkdown' opts (BulletList items) = do
602blockToMarkdown' opts (BulletList items) = do