Skip to content
Snippets Groups Projects
Commit 9bcd1484 authored by Hakim El Hattab's avatar Hakim El Hattab
Browse files

notes defined in data-notes attributes retain preformatted whitespace

parent 1116d99e
Branches
Tags
No related merge requests found
...@@ -239,6 +239,7 @@ ...@@ -239,6 +239,7 @@
// No need for updating the notes in case of fragment changes // No need for updating the notes in case of fragment changes
if ( data.notes ) { if ( data.notes ) {
notes.classList.remove( 'hidden' ); notes.classList.remove( 'hidden' );
notesValue.style.whiteSpace = data.whitespace;
if( data.markdown ) { if( data.markdown ) {
notesValue.innerHTML = marked( data.notes ); notesValue.innerHTML = marked( data.notes );
} }
......
...@@ -55,12 +55,14 @@ var RevealNotes = (function() { ...@@ -55,12 +55,14 @@ var RevealNotes = (function() {
type: 'state', type: 'state',
notes: '', notes: '',
markdown: false, markdown: false,
whitespace: 'normal',
state: Reveal.getState() state: Reveal.getState()
}; };
// Look for notes defined in a slide attribute // Look for notes defined in a slide attribute
if( slideElement.hasAttribute( 'data-notes' ) ) { if( slideElement.hasAttribute( 'data-notes' ) ) {
messageData.notes = slideElement.getAttribute( 'data-notes' ); messageData.notes = slideElement.getAttribute( 'data-notes' );
messageData.whitespace = 'pre-wrap';
} }
// Look for notes defined in an aside element // Look for notes defined in an aside element
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment