Skip to content

Commit

Permalink
prevent extra \n at end of single notes hakimel#3010
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Sep 5, 2022
1 parent 01efcf2 commit 8a97ad5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/reveal.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js.map

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions js/controllers/notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,7 @@ export default class Notes {
// ... or using <aside class="notes"> elements
let notesElements = slide.querySelectorAll( 'aside.notes' );
if( notesElements ) {
let notes = "";
for (let i = 0; i < notesElements.length; i++) {
notes += notesElements[i].innerHTML + "\n";
}
return notes;
return Array.from(notesElements).map( notesElement => notesElement.innerHTML ).join( '\n' );
}

return null;
Expand Down

0 comments on commit 8a97ad5

Please sign in to comment.