Skip to content

Commit

Permalink
Fix double link resolution in packages/merge mode
Browse files Browse the repository at this point in the history
Resolves #2680
  • Loading branch information
Gerrit0 committed Aug 21, 2024
1 parent f0f3d96 commit ea0ea91
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Unreleased

### Bug Fixes

- Fixed an issue where links in packages mode would be resolved incorrectly, #2680.

## v0.26.6 (2024-08-18)

### Features
Expand Down
8 changes: 7 additions & 1 deletion src/lib/converter/comments/linkResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
type CommentDisplayPart,
DeclarationReflection,
type InlineTagDisplayPart,
type Reflection,
Reflection,
ReflectionSymbolId,
} from "../../models";
import {
Expand Down Expand Up @@ -112,6 +112,12 @@ function resolveLinkTag(
externalResolver: ExternalSymbolResolver,
options: LinkResolverOptions,
): InlineTagDisplayPart {
// This tag may have already been resolved to if we are running in packages mode
// or when reading in a JSON file. #2680.
if (typeof part.target === "string" || part.target instanceof Reflection) {
return part;
}

let defaultDisplayText = "";
let pos = 0;
const end = part.text.length;
Expand Down

0 comments on commit ea0ea91

Please sign in to comment.