diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-08-10 07:48:28 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-08-10 07:48:28 -0700 |
commit | e9eaf8421567b2d54b415b642ec1077d79907a10 (patch) | |
tree | e963d3e81a128b9d65d53d2367aa5e6ad78247e0 /src | |
parent | f4bff5d3599d0b6874c6b6604fb11016f8e038a9 (diff) | |
download | pandoc-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')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 6 |
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 |