From 8df8262350aa5f426799087e13113b1dd7c7368f Mon Sep 17 00:00:00 2001 From: Sage Abdullah Date: Thu, 10 Jul 2025 11:26:08 +0000 Subject: [PATCH] Handle relative links in --- src/lib/converter/comments/textParser.ts | 7 +++++- src/test/comments.test.ts | 32 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/lib/converter/comments/textParser.ts b/src/lib/converter/comments/textParser.ts index 6277e9aa2..fcaa10857 100644 --- a/src/lib/converter/comments/textParser.ts +++ b/src/lib/converter/comments/textParser.ts @@ -297,7 +297,7 @@ function checkReference(data: TextParserData): RelativeLink | undefined { } /** - * Looks for `` and `` + * Looks for ``, ``, and `` */ function checkTagLink(data: TextParserData): RelativeLink | undefined { const { pos, token } = data; @@ -311,6 +311,11 @@ function checkTagLink(data: TextParserData): RelativeLink | undefined { data.pos += 3; return checkAttribute(data, "href"); } + + if (token.text.startsWith(" { ); }); + it("Recognizes HTML picture source srcset links", () => { + const comment = getComment(`/** + * + * + * + */`); + + equal( + comment.summary, + [ + { kind: "text", text: '\n\n', + }, + ] satisfies CommentDisplayPart[], + ); + }); + it("Recognizes HTML anchor links", () => { const comment = getComment(`/** *