소스 검색

add support for aside element notes inside of fragments (fixes #3478)

Hakim El Hattab 1 년 전
부모
커밋
db2523db27
3개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 0
      plugin/notes/notes.esm.js
  2. 0 0
      plugin/notes/notes.js
  3. 5 1
      plugin/notes/plugin.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
plugin/notes/notes.esm.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
plugin/notes/notes.js


+ 5 - 1
plugin/notes/plugin.js

@@ -147,7 +147,11 @@ const Plugin = () => {
 
 		// Look for notes defined in an aside element
 		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';
 		}
 

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.