diff --git a/src/vs/base/common/strings.ts b/src/vs/base/common/strings.ts index 2200f4e57214487fc395608dbc52f4ba7277a87a..449fadff2dd27f8030996b851b92b97ea74e1edc 100644 --- a/src/vs/base/common/strings.ts +++ b/src/vs/base/common/strings.ts @@ -221,7 +221,7 @@ export function createRegExp(searchString: string, isRegex: boolean, options: Re export function regExpLeadsToEndlessLoop(regexp: RegExp): boolean { // Exit early if it's one of these special cases which are meant to match // against an empty string - if (regexp.source === '^' || regexp.source === '^$' || regexp.source === '$') { + if (regexp.source === '^' || regexp.source === '^$' || regexp.source === '$' || regexp.source === '^\\s*$') { return false; }