diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-06-01 21:57:49 -0600 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-06-01 21:57:49 -0600 |
commit | 3b628f7664a95e6f3b3d7da177c83333ec2bc0fa (patch) | |
tree | d4ce09bf8a14d891d77246b6d308fd5a51e2a61e /src/Text | |
parent | 2e4ef14d9112f230e336a1f3767f87293bdfb73e (diff) | |
download | pandoc-3b628f7664a95e6f3b3d7da177c83333ec2bc0fa.tar.gz |
HTML writer: Don't omit width attribute on div.
Closes #7342.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index f7a387927..b1dd9a659 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -770,9 +770,10 @@ blockToHtml opts (Div attr@(ident, classes, kvs') bs) = do lookup "entry-spacing" kvs' >>= safeRead } let isCslBibEntry = "csl-entry" `elem` classes - let kvs = [(k,v) | (k,v) <- kvs', k /= "width"] ++ - [("style", "width:" <> w <> ";") | "column" `elem` classes, - ("width", w) <- kvs'] ++ + let kvs = [(k,v) | (k,v) <- kvs' + , k /= "width" || "column" `notElem` classes] ++ + [("style", "width:" <> w <> ";") | "column" `elem` classes + , ("width", w) <- kvs'] ++ [("role", "doc-bibliography") | isCslBibBody && html5] ++ [("role", "doc-biblioentry") | isCslBibEntry && html5] let speakerNotes = "notes" `elem` classes |