Markdown writer: render caption as following paragraph...

when `Ext_table_caption` not enabled.
This commit is contained in:
John MacFarlane
2020-07-19 22:51:59 -07:00
parent 0df5ea87cf
commit 8d0676ec4d
+5 -2
View File
@@ -584,9 +584,12 @@ blockToMarkdown' opts t@(Table _ blkCapt specs thead tbody tfoot) = do
let numcols = maximum (length aligns : length widths :
map length (headers:rows))
caption' <- inlineListToMarkdown opts caption
let caption'' = if null caption || not (isEnabled Ext_table_captions opts)
let caption'' = if null caption
then blankline
else blankline $$ (": " <> caption') $$ blankline
else
if isEnabled Ext_table_captions opts
then blankline $$ (": " <> caption') $$ blankline
else blankline $$ caption' $$ blankline
let hasSimpleCells = onlySimpleTableCells $ headers : rows
let isSimple = hasSimpleCells && all (==0) widths
let isPlainBlock (Plain _) = True