diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-07-18 14:45:17 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-07-19 22:51:59 -0700 |
commit | 8d0676ec4dedc07becdc6f267f39432011538218 (patch) | |
tree | c3356b4e889384f92e15b558927f4c6a22c1c208 /src/Text | |
parent | 0df5ea87cf4dbfef586353883f3eb8af3da232df (diff) | |
download | pandoc-8d0676ec4dedc07becdc6f267f39432011538218.tar.gz |
Markdown writer: render caption as following paragraph...
when `Ext_table_caption` not enabled.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 7 |
1 files changed, 5 insertions, 2 deletions
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 |