diff --git a/src/lib/markdown.ts b/src/lib/markdown.ts index 2bae17a50..df98bbc83 100644 --- a/src/lib/markdown.ts +++ b/src/lib/markdown.ts @@ -135,16 +135,16 @@ export class Renderer extends BaseRenderer { return this.#stripEmphasizedStyling ? text : `${text}`; } - link(href: string, _title: string, text: string): string { + link(href: string, title: string | undefined | null, text: string): string { if (href.startsWith("#")) { // By lowercasing we avoid casing mismatches, between headings and links. - return `${text}`; + return `${text}`; } else { href = URL.canParse(href, this.#baseUrl) ? new URL(href, this.#baseUrl).href : href; - return `${text}`; + return `${text}`; } } }