@@ -224,13 +224,20 @@ prefixedId opts s =
224224 "" -> mempty
225225 _ -> A.id $ toValue $ writerIdentifierPrefix opts ++ s
226226
227−-- | Replacement for Text.XHtml's unordList.
228−unordList :: WriterOptions -> ([Html] -> Html)
229−unordList opts items = H.ul $ mconcat $ toListItems opts items
227+toList :: (Html -> Html) -> WriterOptions -> ([Html] -> Html)
228+toList listop opts items = do
229+ let items' = toListItems opts items
230+ if (writerIncremental opts)
231+ then if (writerSlideVariant opts /= RevealJsSlides)
232+ then (listop $ mconcat items') ! A.class_ "incremental"
233+ else listop $ mconcat $ map (! A.class_ "fragment") items'
234+ else listop $ mconcat items'
230235
231−-- | Replacement for Text.XHtml's ordList.
232−ordList :: WriterOptions -> ([Html] -> Html)
233−ordList opts items = H.ol $ mconcat $ toListItems opts items
236+unordList :: WriterOptions -> [Html] -> Html
237+unordList = toList H.ul
238+
239+ordList :: WriterOptions -> [Html] -> Html
240+ordList = toList H.ol
234241
235242-- | Construct table of contents from list of elements.
236243tableOfContents :: WriterOptions -> [Element] -> State WriterState (Maybe Html)
@@ -476,18 +483,11 @@ blockToHtml opts (Header level (ident,_,_) lst) = do
476483 _ -> H.p contents''
477484blockToHtml opts (BulletList lst) = do
478485 contents <- mapM (blockListToHtml opts) lst
479− let lst' = unordList opts contents
480− let lst'' = if writerIncremental opts
481− then lst' ! A.class_ "incremental"
482− else lst'
483− return lst''
486+ return $ unordList opts contents
484487blockToHtml opts (OrderedList (startnum, numstyle, _) lst) = do
485488 contents <- mapM (blockListToHtml opts) lst
486489 let numstyle' = camelCaseToHyphenated $ show numstyle
487− let attribs = (if writerIncremental opts
488− then [A.class_ "incremental"]
489− else []) ++
490− (if startnum /= 1
490+ let attribs = (if startnum /= 1
491491 then [A.start $ toValue startnum]
492492 else []) ++
493493 (if numstyle /= DefaultStyle