summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/HTML.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Writers/HTML.hs')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index b899ce96a..c73af4604 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -640,8 +640,14 @@ blockToHtml opts (LineBlock lns) =
let lf = preEscapedString "\n"
htmlLines <- mconcat . intersperse lf <$> mapM (inlineListToHtml opts) lns
return $ H.div ! A.class_ "line-block" $ htmlLines
-blockToHtml opts (Div attr@(ident, classes, kvs) bs) = do
+blockToHtml opts (Div attr@(ident, classes, kvs') bs) = do
html5 <- gets stHtml5
+ let kvs = kvs' ++
+ if "column" `elem` classes
+ then let w = fromMaybe "48%" (lookup "width" kvs')
+ in [("style", "width:" ++ w ++ ";min-width:" ++ w ++
+ ";vertical-align:top;")]
+ else []
let speakerNotes = "notes" `elem` classes
-- we don't want incremental output inside speaker notes, see #1394
let opts' = if speakerNotes then opts{ writerIncremental = False } else opts