@@ -241,7 +241,7 @@ pandocToHtml opts (Pandoc meta blocks) = do
241241 then blocks
242242 else prepSlides slideLevel blocks
243243 toc <- if writerTableOfContents opts && slideVariant /= S5Slides
244− then tableOfContents opts sects
244+ then fmap renderHtml' <$> tableOfContents opts sects
245245 else return Nothing
246246 blocks' <- liftM (mconcat . intersperse (nl opts)) $
247247 mapM (elementToHtml slideLevel opts) sects
@@ -292,7 +292,11 @@ pandocToHtml opts (Pandoc meta blocks) = do
292292 MathJax _ -> True
293293 _ -> False) $
294294 defField "quotes" (stQuotes st) $
295− maybe id (defField "toc" . renderHtml') toc $
295+ -- for backwards compatibility we populate toc
296+ -- with the contents of the toc, rather than a
297+ -- boolean:
298+ maybe id (defField "toc") toc $
299+ maybe id (defField "table-of-contents") toc $
296300 defField "author-meta" authsMeta $
297301 maybe id (defField "date-meta") (normalizeDate dateMeta) $
298302 defField "pagetitle" (stringifyHTML (docTitle meta)) $