mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
format/htmlparser: keep <> when converting links without text
This commit is contained in:
parent
0115ba0258
commit
b72caa948c
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue