fix(transclusion): prevent duplicate transclusion if multiple transclusions are present. (#982)
This commit is contained in:
		@@ -118,11 +118,12 @@ export function renderPage(
 | 
				
			|||||||
              // skip until we find the blockref that matches
 | 
					              // skip until we find the blockref that matches
 | 
				
			||||||
              if (el.properties?.id === blockRef) {
 | 
					              if (el.properties?.id === blockRef) {
 | 
				
			||||||
                startIdx = i
 | 
					                startIdx = i
 | 
				
			||||||
                startDepth = Number(el.tagName.substring(1))
 | 
					                startDepth = depth
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            } else if (depth <= startDepth) {
 | 
					            } else if (depth <= startDepth) {
 | 
				
			||||||
              // looking for new header that is same level or higher
 | 
					              // looking for new header that is same level or higher
 | 
				
			||||||
              endIdx = i
 | 
					              endIdx = i
 | 
				
			||||||
 | 
					              break
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user