Tab to switch contexts, alt+enter to inject a link
This commit is contained in:
@@ -57,7 +57,7 @@ export function getAllIndices(text: string, regex: RegExp): SearchMatch[] {
|
||||
}
|
||||
|
||||
export function stringsToRegex(strings: string[]): RegExp {
|
||||
if (!strings.length) return /^$/
|
||||
if (!strings.length) return /^$/g
|
||||
return new RegExp(strings.map(s => `(${escapeRegex(s)})`).join('|'), 'gi')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user