mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-23 18:54:39 +02:00
Backport #32695 by yp05327 Co-authored-by: yp05327 <576951401@qq.com>
This commit is contained in:
1 parent
4b73e92264
commit
a332805f6e
2 files changed
+2
-1
No files matched your search
@@ -90,6 +90,7 @@ function filterRepoFiles(filter) {
|
||||
const span = document.createElement('span');
|
||||
// safely escape by using textContent
|
||||
span.textContent = part;
|
||||
span.title = span.textContent;
|
||||
// if the target file path is "abc/xyz", to search "bx", then the matchResult is ['a', 'b', 'c/', 'x', 'yz']
|
||||
// the matchResult[odd] is matched and highlighted to red.
|
||||
if (index % 2 === 1) span.classList.add('ui', 'text', 'red');
|
||||
|
||||
Reference in new issue
Block a user