]> source.dussan.org Git - gitea.git/commit
Render email addresses as such if followed by punctuation (#27987)
authorYarden Shoham <git@yardenshoham.com>
Sat, 11 Nov 2023 04:08:19 +0000 (06:08 +0200)
committerGitHub <noreply@github.com>
Sat, 11 Nov 2023 04:08:19 +0000 (05:08 +0100)
commit1c0566f66dcb35b33b0b308356e1b16a26ea906b
tree832929cd484c860417fcf8c0666b1075f365a2fe
parent6c9e196e5457b30716f3939f258dca07567a2637
Render email addresses as such if followed by punctuation (#27987)

Added the following characters to the regular expression for the email:

- ,
- ;
- ?
- !

Also added a test case.

- Fixes #27616

# Before

![image](https://github.com/go-gitea/gitea/assets/20454870/c57eac26-f281-43ef-a51d-9c9a81b63efa)

# After

![image](https://github.com/go-gitea/gitea/assets/20454870/fc7d5c08-4350-4af0-a7f0-d1444d2d75af)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
modules/markup/html.go
modules/markup/html_test.go