From 0918d38be9e07ae204d02e9853a6bff2b8706994 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Wed, 13 Mar 2024 16:28:54 +0100 Subject: [PATCH] Add title attribute to anchor tags --- src/lib/markdown.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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}`; } } }