Fixes #65281: Treat the presence of \w as an indicator of a multiline regex search string

上级 2d87c95e
......@@ -85,7 +85,7 @@ export function isMultilineRegexSource(searchString: string): boolean {
}
const nextChCode = searchString.charCodeAt(i);
if (nextChCode === CharCode.n || nextChCode === CharCode.r || nextChCode === CharCode.W) {
if (nextChCode === CharCode.n || nextChCode === CharCode.r || nextChCode === CharCode.W || nextChCode === CharCode.w) {
return true;
}
}
......
......@@ -721,6 +721,20 @@ suite('TextModelSearch', () => {
);
});
test('issue #65281. \w should match line break.', () => {
assertFindMatches(
[
'this/is{',
'a test',
'}',
].join('\n'),
'this/\\w*[^}]*', true, false, null,
[
[1, 1, 3, 1]
]
);
});
test('Simple find using unicode escape sequences', () => {
assertFindMatches(
regularText.join('\n'),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册