diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-02-22 19:15:38 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-02-22 19:15:38 -0800 |
commit | 9b190ec3db5fd4ee0f27e8bd92c7070debc9b5dd (patch) | |
tree | 111fd350f6bb7f03f78a22be652e07d6ceed1625 /src/Text | |
parent | 8df380486c986141ea448e74cdd37e4faae773a1 (diff) | |
download | pandoc-9b190ec3db5fd4ee0f27e8bd92c7070debc9b5dd.tar.gz |
Made HTML writer sensitive to `writerNumberFrom`.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 427edcde3..d8da74d3a 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -274,7 +274,10 @@ 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 - modify $ \st -> st{stSecNum = num} -- update section number + let num' = case num of + (n:ns) -> n + writerNumberFrom opts - 1 : ns + [] -> [] + modify $ \st -> st{stSecNum = num'} -- update section number -- always use level 1 for slide titles let level' = if slide then 1 else level let titleSlide = slide && level < slideLevel |