From b72caa948c18be24000a91d844bb1dd7c192655b Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 26 Feb 2025 22:56:29 +0200 Subject: [PATCH] format/htmlparser: keep <> when converting links without text --- format/htmlparser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/format/htmlparser.go b/format/htmlparser.go index 7c3b3c88..25543926 100644 --- a/format/htmlparser.go +++ b/format/htmlparser.go @@ -455,7 +455,7 @@ var MarkdownHTMLParser = &HTMLParser{ PillConverter: DefaultPillConverter, LinkConverter: func(text, href string, ctx Context) string { if text == href { - return text + return fmt.Sprintf("<%s>", href) } return fmt.Sprintf("[%s](%s)", text, href) },