aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-08-10 07:48:28 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-08-10 07:48:28 -0700
commite9eaf8421567b2d54b415b642ec1077d79907a10 (patch)
treee963d3e81a128b9d65d53d2367aa5e6ad78247e0 /src/Text/Pandoc/Writers
parentf4bff5d3599d0b6874c6b6604fb11016f8e038a9 (diff)
downloadpandoc-e9eaf8421567b2d54b415b642ec1077d79907a10.tar.gz
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.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index fecb32464..b899ce96a 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -403,8 +403,12 @@ elementToHtml slideLevel opts (Sec level num (id',classes,keyvals) title' elemen
then return mempty
else do
modify (\st -> st{ stElement = True})
+ let level' = if level <= slideLevel &&
+ slideVariant == SlidySlides
+ then 1 -- see #3566
+ else level
res <- blockToHtml opts
- (Header level (id',classes,keyvals) title')
+ (Header level' (id',classes,keyvals) title')
modify (\st -> st{ stElement = False})
return res