@@ -30,6 +30,7 @@ Conversion of 'Pandoc' documents to HTML.
3030-}
3131module Text.Pandoc.Writers.HTML ( writeHtml , writeHtmlString ) where
3232import Text.Pandoc.Definition
33+import Text.Pandoc.Walk
3334import Data.Monoid ((<>))
3435import Text.Pandoc.Shared
3536import Text.Pandoc.Writers.Shared
@@ -228,8 +229,7 @@ defList opts items = toList H.dl opts (items ++ [nl opts])
228229tableOfContents :: PandocMonad m => WriterOptions -> [Element] -> StateT WriterState m (Maybe Html)
229230tableOfContents _ [] = return Nothing
230231tableOfContents opts sects = do
231− let opts' = opts { writerIgnoreNotes = True }
232− contents <- mapM (elementToListItem opts') sects
232+ contents <- mapM (elementToListItem opts) sects
233233 let tocList = catMaybes contents
234234 return $ if null tocList
235235 then Nothing
@@ -253,7 +253,7 @@ elementToListItem opts (Sec lev num (id',classes,_) headerText subsecs)
253253 then (H.span ! A.class_ "toc-section-number"
254254 $ toHtml $ showSecNum num') >> preEscapedString " "
255255 else mempty
256− txt <- liftM (sectnum >>) $ inlineListToHtml opts headerText
256+ txt <- liftM (sectnum >>) $ inlineListToHtml opts $ walk deNote headerText
257257 subHeads <- mapM (elementToListItem opts) subsecs >>= return . catMaybes
258258 let subList = if null subHeads
259259 then mempty
@@ -852,9 +852,7 @@ inlineToHtml opts inline =
852852 imgAttrsToHtml opts attr
853853 return $ foldl (!) H5.embed attributes
854854 -- note: null title included, as in Markdown.pl
855− (Note contents)
856− | writerIgnoreNotes opts -> return mempty
857− | otherwise -> do
855+ (Note contents) -> do
858856 notes <- gets stNotes
859857 let number = (length notes) + 1
860858 let ref = show number