aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-02-23 18:51:33 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-02-23 18:51:33 -0800
commit8b8c8cfed928a2429a8640213694c82635039c5a (patch)
treef20e55c85958a4bcfba75b19f30a091d9380c9e5 /src
parent5afe5218b799d2d9a96ae11f6abac59a62a72eff (diff)
downloadpandoc-8b8c8cfed928a2429a8640213694c82635039c5a.tar.gz
HTML writer: fix case when writerNumberOffet is empty or short.
We add 0s to the end of the list if it's shorter than needed.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index 477087166..98d352382 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -274,7 +274,7 @@ elementToHtml :: Int -> WriterOptions -> Element -> State WriterState Html
elementToHtml _slideLevel opts (Blk block) = blockToHtml opts block
elementToHtml slideLevel opts (Sec level num (id',classes,keyvals) title' elements) = do
let slide = writerSlideVariant opts /= NoSlides && level <= slideLevel
- let num' = zipWith (+) num (writerNumberOffset opts)
+ let num' = zipWith (+) num (writerNumberOffset opts ++ repeat 0)
modify $ \st -> st{stSecNum = num'} -- update section number
-- always use level 1 for slide titles
let level' = if slide then 1 else level