@@ -695,12 +695,12 @@ blockToHtml opts (Div (ident, "section":dclasses, dkvs)
695695 let fragmentClass = case slideVariant of
696696 RevealJsSlides -> "fragment"
697697 _ -> "incremental"
698− let inDiv zs = RawBlock (Format "html") ("<div class=\""
698+ let inDiv' zs = RawBlock (Format "html") ("<div class=\""
699699 <> fragmentClass <> "\">") :
700700 (zs ++ [RawBlock (Format "html") "</div>"])
701701 let breakOnPauses zs = case splitBy isPause zs of
702702 [] -> []
703− y:ys -> y ++ concatMap inDiv ys
703+ y:ys -> y ++ concatMap inDiv' ys
704704 let (titleBlocks, innerSecs) =
705705 if titleSlide
706706 -- title slides have no content of their own
@@ -783,9 +783,7 @@ blockToHtml opts (Div attr@(ident, classes, kvs') bs) = do
783783 -- a newline between the column divs, which throws
784784 -- off widths! see #4028
785785 mconcat <$> mapM (blockToHtml opts) bs
786− else if isCslBibEntry
787− then mconcat <$> mapM (cslEntryToHtml opts') bs
788− else blockListToHtml opts' bs
786+ else blockListToHtml opts' bs
789787 let contents' = nl opts >> contents >> nl opts
790788 let (divtag, classes'') = if html5 && "section" `elem` classes'
791789 then (H5.section, filter (/= "section") classes')
@@ -1213,6 +1211,10 @@ inlineToHtml opts inline = do
12131211 LineBreak -> return $ do
12141212 if html5 then H5.br else H.br
12151213 strToHtml "\n"
1214+ (Span ("",[cls],[]) ils)
1215+ | cls == "csl-block" || cls == "csl-left-margin" ||
1216+ cls == "csl-right-inline" || cls == "csl-indent"
1217+ -> inlineListToHtml opts ils >>= inDiv cls
12161218
12171219 (Span (id',classes,kvs) ils) ->
12181220 let spanLikeTag = case classes of
@@ -1462,22 +1464,12 @@ blockListToNote opts ref blocks = do
14621464 _ -> noteItem
14631465 return $ nl opts >> noteItem'
14641466
1465−cslEntryToHtml :: PandocMonad m
1466− => WriterOptions
1467− -> Block
1468− -> StateT WriterState m Html
1469−cslEntryToHtml opts (Para xs) = do
1467+inDiv :: PandocMonad m=> Text -> Html -> StateT WriterState m Html
1468+inDiv cls x = do
14701469 html5 <- gets stHtml5
1471− let inDiv :: Text -> Html -> Html
1472− inDiv cls x = (if html5 then H5.div else H.div)
1473− x ! A.class_ (toValue cls)
1474− let go (Span ("",[cls],[]) ils)
1475− | cls == "csl-block" || cls == "csl-left-margin" ||
1476− cls == "csl-right-inline" || cls == "csl-indent"
1477− = inDiv cls <$> inlineListToHtml opts ils
1478− go il = inlineToHtml opts il
1479− mconcat <$> mapM go xs
1480−cslEntryToHtml opts x = blockToHtml opts x
1470+ return $
1471+ (if html5 then H5.div else H.div)
1472+ x ! A.class_ (toValue cls)
14811473
14821474isMathEnvironment :: Text -> Bool
14831475isMathEnvironment s = "\\begin{" `T.isPrefixOf` s &&