1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-16 07:18:37 +00:00

Fix markdown rendering when mentioning users (#30795)

This commit is contained in:
wxiaoguang
2024-05-02 09:00:46 +08:00
committed by GitHub
parent 6f7cd94a02
commit ce08a9fe2f
4 changed files with 14 additions and 10 deletions

View File

@@ -392,6 +392,7 @@ func TestRegExp_mentionPattern(t *testing.T) {
{"@gitea,", "@gitea"},
{"@gitea;", "@gitea"},
{"@gitea/team1;", "@gitea/team1"},
{"@user's idea", "@user"},
}
falseTestCases := []string{
"@ 0",
@@ -412,7 +413,6 @@ func TestRegExp_mentionPattern(t *testing.T) {
for _, testCase := range trueTestCases {
found := mentionPattern.FindStringSubmatch(testCase.pat)
assert.Len(t, found, 2)
assert.Equal(t, testCase.exp, found[1])
}
for _, testCase := range falseTestCases {