You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/guides/src/Nodes/ProjectNode.php
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -154,6 +154,10 @@ public function addLinkTarget(string $anchorName, InternalTarget $target): void
154
154
}
155
155
156
156
if (isset($this->internalLinkTargets[$linkType][$anchorName]) && $linkType !== 'std:title') {
157
+
if ($this->internalLinkTargets[$linkType][$anchorName]->getDocumentPath() === $target->getDocumentPath()) {
158
+
return;
159
+
}
160
+
157
161
thrownewDuplicateLinkAnchorException(sprintf('Duplicate anchor "%s". There is already another anchor of that name in document "%s"', $anchorName, $this->internalLinkTargets[$linkType][$anchorName]->getDocumentPath()));
0 commit comments