From 8d0676ec4dedc07becdc6f267f39432011538218 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 18 Jul 2020 14:45:17 -0700 Subject: Markdown writer: render caption as following paragraph... when `Ext_table_caption` not enabled. --- src/Text/Pandoc/Writers/Markdown.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index c6a9d9d80..1fe71c973 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -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 -- cgit v1.2.3