Skip to content

Commit

Permalink
Fix link resolution for monorepo readmes
Browse files Browse the repository at this point in the history
Resolves #2029
  • Loading branch information
Gerrit0 committed Aug 13, 2022
1 parent 23ea426 commit 295c97f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Unreleased

### Bug Fixes

- Readme files within monorepos now have `@link` tags resolved, #2029.

## v0.23.10 (2022-07-31)

### Features
Expand Down
11 changes: 11 additions & 0 deletions src/lib/converter/plugins/LinkResolverPlugin.ts
Expand Up @@ -2,6 +2,7 @@ import { Component, ConverterComponent } from "../components";
import type { Context } from "../../converter";
import { ConverterEvents } from "../converter-events";
import { BindOption, ValidationOptions } from "../../utils";
import { DeclarationReflection } from "../../models";

/**
* A plugin that resolves `{@link Foo}` tags.
Expand All @@ -24,6 +25,16 @@ export class LinkResolverPlugin extends ConverterComponent {
if (reflection.comment) {
context.converter.resolveLinks(reflection.comment, reflection);
}

if (
reflection instanceof DeclarationReflection &&
reflection.readme
) {
reflection.readme = context.converter.resolveLinks(
reflection.readme,
reflection
);
}
}

if (context.project.readme) {
Expand Down

0 comments on commit 295c97f

Please sign in to comment.