diff options
| author | Nikolay Yakimov <[email protected]> | 2025-05-24 21:41:45 +0400 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2025-05-26 20:38:40 -0700 |
| commit | 8d93cd794955578b105e163e8a79df2bc05fc02e (patch) | |
| tree | fd0d23c244d7371ced4a09e48b4b74411a5357e8 /src | |
| parent | 28e01fac74c88a777dc69c693f1296e46e1d738c (diff) | |
Markdown writer: preserve figure attributes
0d2114e introduced a bug where Markdown writer would ignore attributes
on the figure if it has class or key-value attributes set.
This commit fixes that and adds a regression test.
Closes #10867
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 93ce8e937..9adff3597 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -721,7 +721,6 @@ blockToMarkdown' opts (Figure figattr capt body) = do let combinedAttr imgattr = case imgattr of ("", cls, kv) | (figid, [], []) <- figattr -> Just (figid, cls, kv) - | otherwise -> Just ("", cls, kv) _ -> Nothing let combinedAlt alt = case capt of Caption Nothing [] -> if null alt |
