diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-12-26 08:38:19 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-12-26 08:40:33 -0800 |
commit | 718b2c5837f4a72a6ba58bc5c307431316e7d4dc (patch) | |
tree | 051e654ca1f7b50d853a5ccee18538e28643c004 /src | |
parent | 9dea8a27e200fe620a36e20f6bbf64c7f1bdad94 (diff) | |
download | pandoc-718b2c5837f4a72a6ba58bc5c307431316e7d4dc.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 3 |
1 files changed, 1 insertions, 2 deletions
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 |