Slidy writer: use h1 for all slides...

even if they were originally level 2 headers.
Otherwise the built-in table of contents in Slidy breaks.

Closes #3566.
This commit is contained in:
John MacFarlane 2017-08-10 07:48:28 -07:00
parent f4bff5d359
commit e9eaf84215

View file

@ -403,8 +403,12 @@ elementToHtml slideLevel opts (Sec level num (id',classes,keyvals) title' elemen
then return mempty then return mempty
else do else do
modify (\st -> st{ stElement = True}) modify (\st -> st{ stElement = True})
let level' = if level <= slideLevel &&
slideVariant == SlidySlides
then 1 -- see #3566
else level
res <- blockToHtml opts res <- blockToHtml opts
(Header level (id',classes,keyvals) title') (Header level' (id',classes,keyvals) title')
modify (\st -> st{ stElement = False}) modify (\st -> st{ stElement = False})
return res return res