Skip to content
代码片段 群组 项目
未验证 提交 7ac19f75 编辑于 作者: Heinrich Lee Yu's avatar Heinrich Lee Yu 提交者: GitLab
浏览文件

Merge branch '517768-case-insensitive-labels-autocomplete' into 'master'

Make multi-word label matching case-insensitive

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/180823



Merged-by: default avatarHeinrich Lee Yu <heinrich@gitlab.com>
Approved-by: default avatarLindsey Shelton <lshelton@gitlab.com>
Approved-by: default avatarTomas Bulva <tbulva@gitlab.com>
Approved-by: default avatarCostel Maxim <cmaxim@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -700,8 +700,8 @@ class GfmAutoComplete { ...@@ -700,8 +700,8 @@ class GfmAutoComplete {
// Do not match if there are two consecutive `~` characters (strikethrough) before the cursor // Do not match if there are two consecutive `~` characters (strikethrough) before the cursor
return null; return null;
} }
const lastCandidate = subtext.split(flag).pop(); const lastCandidate = subtext.split(flag).pop().toLowerCase();
if (labels.find((label) => label.title.startsWith(lastCandidate))) { if (labels.find((label) => label.title.toLowerCase().startsWith(lastCandidate))) {
return lastCandidate; return lastCandidate;
} }
} }
......
...@@ -300,7 +300,7 @@ ...@@ -300,7 +300,7 @@
end end
it 'allows spaces when autocompleting multi-word labels' do it 'allows spaces when autocompleting multi-word labels' do
fill_in 'Comment', with: '~Accepting merge' fill_in 'Comment', with: '~accepting merge'
wait_for_requests wait_for_requests
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册