From 30b670cf42c458b80d0af22abeb5162507229061 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 24 May 2018 09:21:37 +0200 Subject: [PATCH] flatten slide number when there are only vertical slides --- js/reveal.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/reveal.js b/js/reveal.js index 163bc99f..0f409770 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -3043,6 +3043,12 @@ format = config.slideNumber; } + // If there are ONLY vertical slides in this deck, always use + // a flattened slide number + if( !/c/.test( format ) && dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ).length === 1 ) { + format = 'c'; + } + switch( format ) { case 'c': value.push( getSlidePastCount() + 1 );