From 718b2c5837f4a72a6ba58bc5c307431316e7d4dc Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 26 Dec 2017 08:38:19 -0800 Subject: HTML writer: Use br elements in line blocks... instead of relying on CSS. Closes #4162. HTML-based templates have had the custom CSS for div.line-block removed. Those maintaining custom templates will want to remove this too. We still enclose line blocks in a div with class line-block. --- src/Text/Pandoc/Writers/HTML.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index f25bbadfb..7ff7284cc 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -670,8 +670,7 @@ blockToHtml opts (LineBlock lns) = if writerWrapText opts == WrapNone then blockToHtml opts $ linesToPara lns else do - let lf = preEscapedString "\n" - htmlLines <- mconcat . intersperse lf <$> mapM (inlineListToHtml opts) lns + htmlLines <- inlineListToHtml opts $ intercalate [LineBreak] lns return $ H.div ! A.class_ "line-block" $ htmlLines blockToHtml opts (Div attr@(ident, classes, kvs') bs) = do html5 <- gets stHtml5 -- cgit v1.2.3