mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Merge pull request #3347 from Microsoft/irregularExpressionCompletion
Block completion when in the flags of a regular expression
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////let v = 100;
|
||||
/////a/./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.not.memberListContains('v');
|
||||
verify.memberListContains('compile');
|
||||
@@ -0,0 +1,10 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////let v = 100;
|
||||
////let x = /absidey//**/
|
||||
|
||||
// Should get nothing at the marker since it's
|
||||
// going to be considered part of the regex flags.
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListIsEmpty();
|
||||
@@ -0,0 +1,11 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////let v = 100;
|
||||
////let x = /absidey/
|
||||
/////**/
|
||||
|
||||
// Should not be blocked since there is a
|
||||
// newline separating us from the regex flags.
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListContains("v");
|
||||
@@ -0,0 +1,10 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////let v = 100;
|
||||
////let x = /absidey/ /**/
|
||||
|
||||
// Should not be blocked since there is a
|
||||
// space separating us from the regex flags.
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListContains("v");
|
||||
@@ -0,0 +1,10 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////let v = 100;
|
||||
////let x = /absidey/g/**/
|
||||
|
||||
// Should get nothing at the marker since it's
|
||||
// going to be considered part of the regex flags.
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListIsEmpty()
|
||||
@@ -3,5 +3,5 @@
|
||||
/////a/./**/
|
||||
|
||||
goTo.marker();
|
||||
//verify.not.memberListContains('alert');
|
||||
//verify.memberListContains('compile');
|
||||
verify.not.memberListContains('alert');
|
||||
verify.memberListContains('compile');
|
||||
Reference in New Issue
Block a user