prevent extra \n at end of single notes #3010

This commit is contained in:
hakimel
2022-09-05 11:10:32 +02:00
parent 01efcf2d92
commit 8a97ad58b0
5 changed files with 5 additions and 9 deletions

View File

@ -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;