1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 07:57:46 +02:00

Improve fulltext search API and interface

This commit is contained in:
Toby Zerner
2015-07-07 20:35:18 +09:30
parent 662a4dc54f
commit 5e982a39c5
12 changed files with 62 additions and 81 deletions

View File

@@ -5,7 +5,7 @@ export default function(string, phrase, length) {
return string;
}
const regexp = regexp instanceof RegExp ? phrase : new RegExp(phrase, 'gi');
const regexp = phrase instanceof RegExp ? phrase : new RegExp(phrase, 'gi');
let highlightedString = string;
let start = 0;