Skip to content

Commit

Permalink
fix(docs): consider external urls in summaries
Browse files Browse the repository at this point in the history
resolves #203, fixes #205
  • Loading branch information
almostSouji committed Jul 19, 2024
1 parent 0f6639b commit e0a2e78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/functions/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ function formatSummary(blocks: any[], _package: string, version: string) {
return blocks
.map((block) => {
if (block.kind === 'LinkTag') {
const link = `${DJS_DOCS_BASE}/packages/${_package}/${version}/${block.uri}`;
const isFullLink = block.uri.startsWith('http');
const link = isFullLink ? block.uri : `${DJS_DOCS_BASE}/packages/${_package}/${version}/${block.uri}`;
return hyperlink(block.members ? `${block.text}${block.members}` : block.text, link);
}

Expand Down

0 comments on commit e0a2e78

Please sign in to comment.