add support for aside element notes inside of fragments (fixes #3478)
This commit is contained in:
parent
eb01f8f3a5
commit
db2523db27
3 changed files with 7 additions and 3 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -147,7 +147,11 @@ const Plugin = () => {
|
||||||
|
|
||||||
// Look for notes defined in an aside element
|
// Look for notes defined in an aside element
|
||||||
if( notesElements && notesElements.length ) {
|
if( notesElements && notesElements.length ) {
|
||||||
messageData.notes = Array.from(notesElements).map( notesElement => notesElement.innerHTML ).join( '\n' );
|
// 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';
|
messageData.markdown = notesElements[0] && typeof notesElements[0].getAttribute( 'data-markdown' ) === 'string';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue