mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 11:36:23 +00:00
fix(transclusion): prevent duplicate transclusion if multiple transclusions are present. (#982)
This commit is contained in:
parent
94a54698ab
commit
6e0c102970
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue