git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3e2a6f0
)
browser: fix regexp for case insensitive search
author
Mischa POSLAWSKY
<perl@shiar.org>
Tue, 29 Sep 2020 16:04:27 +0000
(18:04 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Tue, 20 Oct 2020 20:49:11 +0000
(22:49 +0200)
Ignored when applied to match function, even following a RegExp.
searchlocal.js
patch
|
blob
|
history
diff --git
a/searchlocal.js
b/searchlocal.js
index 512f07b8482cf1bf293e16c09d385a6178fb014a..6498e32e06c196aa0a6669ed1ae573c33933058f 100644
(file)
--- a/
searchlocal.js
+++ b/
searchlocal.js
@@
-106,7
+106,7
@@
if (document.querySelector !== undefined) {
else {
// title text (case-insensitive unless caps in input)
var match = function(row) {
- return row.cells[1].textContent.match(
query, /[A-Z]/.test(query) ? '' : 'i'
);
+ return row.cells[1].textContent.match(
new RegExp(query, /[A-Z]/.test(query) ? '' : 'i')
);
};
}
filterrows(table, match, action || 'filter');