Fix bug: do unescaping in the right place, so that it only affects escaped javascript identifiers
This commit is contained in:
parent
1b4b01eed5
commit
6b05ecab5b
|
@ -3234,7 +3234,7 @@ namespace ts {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return unescapeIdentifier(name);
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCompletionData(fileName: string, position: number) {
|
function getCompletionData(fileName: string, position: number) {
|
||||||
|
@ -4141,7 +4141,7 @@ namespace ts {
|
||||||
|
|
||||||
if (!uniqueNames[name]) {
|
if (!uniqueNames[name]) {
|
||||||
uniqueNames[name] = name;
|
uniqueNames[name] = name;
|
||||||
const displayName = getCompletionEntryDisplayName(name, target, /*performCharacterChecks*/ true);
|
const displayName = getCompletionEntryDisplayName(unescapeIdentifier(name), target, /*performCharacterChecks*/ true);
|
||||||
if (displayName) {
|
if (displayName) {
|
||||||
const entry = {
|
const entry = {
|
||||||
name: displayName,
|
name: displayName,
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
// @Filename: a.js
|
// @Filename: a.js
|
||||||
// @allowJs: true
|
// @allowJs: true
|
||||||
////__foo;/**/
|
////___foo; __foo;/**/
|
||||||
|
|
||||||
goTo.marker();
|
goTo.marker();
|
||||||
verify.completionListContains("__foo", undefined, undefined, "warning");
|
verify.completionListContains("__foo", undefined, undefined, "warning");
|
||||||
|
verify.completionListContains("___foo", undefined, undefined, "warning");
|
||||||
|
|
Loading…
Reference in a new issue