Skip to content

Commit

Permalink
Merge branch 'master' into feature/reader-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel authored Oct 12, 2023
2 parents b8b55b8 + 88fbfc5 commit 7108476
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/reveal.esm.js.map

Large diffs are not rendered by default.

17 changes: 14 additions & 3 deletions js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,18 @@ export default function( revealElement, options ) {

if( !config.showHiddenSlides ) {
Util.queryAll( dom.wrapper, 'section[data-visibility="hidden"]' ).forEach( slide => {
slide.parentNode.removeChild( slide );
const parent = slide.parentNode;

// If this slide is part of a stack and that stack will be
// empty after removing the hidden slide, remove the entire
// stack
if( parent.childElementCount === 1 && /section/i.test( parent.nodeName ) ) {
parent.remove();
}
else {
slide.remove();
}

} );
}

Expand Down Expand Up @@ -473,8 +484,8 @@ export default function( revealElement, options ) {
dom.wrapper.setAttribute( 'data-background-transition', config.backgroundTransition );

// Expose our configured slide dimensions as custom props
dom.viewport.style.setProperty( '--slide-width', config.width + 'px' );
dom.viewport.style.setProperty( '--slide-height', config.height + 'px' );
dom.viewport.style.setProperty( '--slide-width', typeof config.width == 'string' ? config.width : config.width + 'px' );

Check failure on line 487 in js/reveal.js

View workflow job for this annotation

GitHub Actions / build (14.x)

Expected '===' and instead saw '=='
dom.viewport.style.setProperty( '--slide-height', typeof config.height == 'string' ? config.height : config.height + 'px' );

Check failure on line 488 in js/reveal.js

View workflow job for this annotation

GitHub Actions / build (14.x)

Expected '===' and instead saw '=='

if( config.shuffle ) {
shuffle();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reveal.js",
"version": "4.6.0",
"version": "4.6.1",
"description": "The HTML Presentation Framework",
"homepage": "https://revealjs.com",
"subdomain": "revealjs",
Expand Down
2 changes: 1 addition & 1 deletion plugin/notes/notes.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion plugin/notes/notes.js

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions plugin/notes/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,12 @@ const Plugin = () => {
}

// Look for notes defined in an aside element
if( notesElements ) {
messageData.notes = Array.from(notesElements).map( notesElement => notesElement.innerHTML ).join( '\n' );
if( notesElements && notesElements.length ) {
// Ignore notes inside of fragments since those are shown
// individually when stepping through fragments
notesElements = Array.from( notesElements ).filter( notesElement => notesElement.closest( '.fragment' ) === null );

messageData.notes = notesElements.map( notesElement => notesElement.innerHTML ).join( '\n' );
messageData.markdown = notesElements[0] && typeof notesElements[0].getAttribute( 'data-markdown' ) === 'string';
}

Expand Down

0 comments on commit 7108476

Please sign in to comment.