Skip to content

Commit

Permalink
fix(scripts): show name of inheriting class on search index (#10424)
Browse files Browse the repository at this point in the history
* fix(scripts): show name of inheriting class on search index

* fix: sanity check
  • Loading branch information
Qjuh committed Aug 3, 2024
1 parent bb459d9 commit f623e7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/scripts/src/generateIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ export function visitNodes(item: ApiItem, tag: string) {

members.push({
id: idx++,
name: member.getScopedNameWithinPackage(),
name: (inherited && member.parent
? member.getScopedNameWithinPackage().replace(new RegExp(`^${member.parent?.displayName}`), item.displayName)
: member.getScopedNameWithinPackage()
).replaceAll('.', '#'),
kind: member.kind,
summary: tryResolveSummaryText(member) ?? '',
path: generatePath(inherited ? [...item.getHierarchy(), member] : member.getHierarchy(), tag),
Expand Down

0 comments on commit f623e7a

Please sign in to comment.