diff options
| author | John MacFarlane <[email protected]> | 2024-06-12 22:47:14 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2024-06-12 23:00:58 -0700 |
| commit | fde7908091661e731cff48e8823394aa1e7f873e (patch) | |
| tree | ba631501aa65b66f464985be7b58d9cda42490de /src/Text | |
| parent | 94975a4e3c50db1c02b373c8196fe77af0522a01 (diff) | |
Markdown writer: don't print extra caption when using `implicit_figures`.
Diffstat (limited to 'src/Text')
| -rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 5ae3f5339..2eaaa54bf 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -716,7 +716,10 @@ blockToMarkdown' opts (Figure figattr capt body) = do -- fallback to raw html if possible or div otherwise if isEnabled Ext_raw_html opts then figureToMarkdown opts figattr capt body - else blockToMarkdown' opts $ figureDiv figattr capt body + else if (isEnabled Ext_fenced_divs opts || isEnabled Ext_native_divs opts) || + not (isEnabled Ext_implicit_figures opts) + then blockToMarkdown' opts $ figureDiv figattr capt body + else blockListToMarkdown opts body inList :: Monad m => MD m a -> MD m a inList p = local (\env -> env {envInList = True}) p |
