未验证 提交 8372344d 编写于 作者: R Rob Lourens

Fix #35012 - allow ^\s*$ regex search

上级 b6ecd78b
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册