fix(transclusion): prevent duplicate transclusion if multiple transclusions are present. (#982)

This commit is contained in:
Emile Bangma 2024-03-10 01:14:31 +01:00 committed by GitHub
parent 94a54698ab
commit 6e0c102970
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,11 +118,12 @@ export function renderPage(
// skip until we find the blockref that matches
if (el.properties?.id === blockRef) {
startIdx = i
startDepth = Number(el.tagName.substring(1))
startDepth = depth
}
} else if (depth <= startDepth) {
// looking for new header that is same level or higher
endIdx = i
break
}
}