diff --git a/src/main/twirl/gitbucket/core/helper/branchcontrol.scala.html b/src/main/twirl/gitbucket/core/helper/branchcontrol.scala.html index 09e3feb..4d3c673 100644 --- a/src/main/twirl/gitbucket/core/helper/branchcontrol.scala.html +++ b/src/main/twirl/gitbucket/core/helper/branchcontrol.scala.html @@ -31,7 +31,7 @@ $('#branch-control-input').keyup(function() { var inputVal = $('#branch-control-input').val(); $.each($('#branch-control-input').parent().parent().find('a'), function(index, elem) { - if (!inputVal || !elem.text.trim() || elem.text.trim().lastIndexOf(inputVal, 0) >= 0) { + if (!inputVal || !elem.text.trim() || elem.text.trim().match(new RegExp(inputVal,'i'))) { $(elem).parent().show(); } else { $(elem).parent().hide();