diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-12-20 22:33:26 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-12-20 22:34:31 -0800 |
commit | 9cbbf18fe18d740e12f564506079f3a2cb853be6 (patch) | |
tree | 7e145d000224b2690ec9b052562c4605b3af9238 /src | |
parent | 8f402beab922646d4c428b40a75fe4d140ab5e9e (diff) | |
download | pandoc-9cbbf18fe18d740e12f564506079f3a2cb853be6.tar.gz |
HTML writer: don't include p tags in CSL bibliography entries.
Fixes a regression in 2.11.3.
Closes #6966
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 76f17f77a..9f9a1013c 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -778,12 +778,17 @@ blockToHtml opts (Div attr@(ident, classes, kvs') bs) = do classes' = case slideVariant of NoSlides -> classes _ -> filter (\k -> k /= "incremental" && k /= "nonincremental") classes + let paraToPlain (Para ils) = Plain ils + paraToPlain x = x + let bs' = if "csl-entry" `elem` classes' + then walk paraToPlain bs + else bs contents <- if "columns" `elem` classes' then -- we don't use blockListToHtml because it inserts -- a newline between the column divs, which throws -- off widths! see #4028 - mconcat <$> mapM (blockToHtml opts) bs - else blockListToHtml opts' bs + mconcat <$> mapM (blockToHtml opts) bs' + else blockListToHtml opts' bs' let contents' = nl opts >> contents >> nl opts let (divtag, classes'') = if html5 && "section" `elem` classes' then (H5.section, filter (/= "section") classes') |