diff options
author | Christian Köberl <derkoe@users.noreply.github.com> | 2018-02-03 10:51:02 +0100 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-02-03 11:51:02 +0200 |
commit | e9e2a9cdcc52e9e33838074ec7e8a0bdbbe8dace (patch) | |
tree | fe7be609c98ad5cd9d8d14c3f35889f0809ba891 /modules/markup/html_test.go | |
parent | e08b3a592e80baeab1a6d7d5f87bed343ff14e1e (diff) | |
download | gitea-e9e2a9cdcc52e9e33838074ec7e8a0bdbbe8dace.tar.gz gitea-e9e2a9cdcc52e9e33838074ec7e8a0bdbbe8dace.zip |
Allow square brackets in external issue patterns (#3408)
* Allow square brackets in external issue patterns
* Added false test cases for checklist elements
Diffstat (limited to 'modules/markup/html_test.go')
-rw-r--r-- | modules/markup/html_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go index 5e783c754f..4e47b47b00 100644 --- a/modules/markup/html_test.go +++ b/modules/markup/html_test.go @@ -345,6 +345,7 @@ func TestRegExp_IssueNumericPattern(t *testing.T) { "#1234", "#0", "#1234567890987654321", + "[#1234]", } falseTestCases := []string{ "# 1234", @@ -355,6 +356,8 @@ func TestRegExp_IssueNumericPattern(t *testing.T) { "#1A2B", "", "ABC", + "[]", + "[x]", } for _, testCase := range trueTestCases { @@ -371,6 +374,7 @@ func TestRegExp_IssueAlphanumericPattern(t *testing.T) { "A-1", "RC-80", "ABCDEFGHIJ-1234567890987654321234567890", + "[JIRA-134]", } falseTestCases := []string{ "RC-08", @@ -383,6 +387,7 @@ func TestRegExp_IssueAlphanumericPattern(t *testing.T) { "ABC", "GG-", "rm-1", + "[]", } for _, testCase := range trueTestCases { |