mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-29 17:54:23 +01:00
fix typo in regexp
This commit is contained in:
parent
574265e4a8
commit
531a18810b
1 changed files with 1 additions and 1 deletions
|
@ -239,7 +239,7 @@ func testNewIssue(t *testing.T, session *TestSession, user, repo, title, content
|
||||||
assert.Contains(t, val, title)
|
assert.Contains(t, val, title)
|
||||||
// test for first line only and if it contains only letters and spaces
|
// test for first line only and if it contains only letters and spaces
|
||||||
contentFirstLine := strings.Split(content, "\n")[0]
|
contentFirstLine := strings.Split(content, "\n")[0]
|
||||||
patNotLetterOrSpace, _ := regexp.MustCompile("[^\\p{L}\\s]")
|
patNotLetterOrSpace := regexp.MustCompile(`[^\p{L}\s]`)
|
||||||
if len(contentFirstLine) != 0 && !patNotLetterOrSpace.MatchString(contentFirstLine) {
|
if len(contentFirstLine) != 0 && !patNotLetterOrSpace.MatchString(contentFirstLine) {
|
||||||
val = htmlDoc.doc.Find(".comment .render-content p").First().Text()
|
val = htmlDoc.doc.Find(".comment .render-content p").First().Text()
|
||||||
assert.Equal(t, contentFirstLine, val)
|
assert.Equal(t, contentFirstLine, val)
|
||||||
|
|
Loading…
Reference in a new issue