mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-08 22:29:37 -05:00
Fix bug: do unescaping in the right place, so that it only affects escaped javascript identifiers
This commit is contained in:
@@ -3234,7 +3234,7 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
return unescapeIdentifier(name);
|
||||
return name;
|
||||
}
|
||||
|
||||
function getCompletionData(fileName: string, position: number) {
|
||||
@@ -4141,7 +4141,7 @@ namespace ts {
|
||||
|
||||
if (!uniqueNames[name]) {
|
||||
uniqueNames[name] = name;
|
||||
const displayName = getCompletionEntryDisplayName(name, target, /*performCharacterChecks*/ true);
|
||||
const displayName = getCompletionEntryDisplayName(unescapeIdentifier(name), target, /*performCharacterChecks*/ true);
|
||||
if (displayName) {
|
||||
const entry = {
|
||||
name: displayName,
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
// @Filename: a.js
|
||||
// @allowJs: true
|
||||
////__foo;/**/
|
||||
////___foo; __foo;/**/
|
||||
|
||||
goTo.marker();
|
||||
verify.completionListContains("__foo", undefined, undefined, "warning");
|
||||
verify.completionListContains("___foo", undefined, undefined, "warning");
|
||||
|
||||
Reference in New Issue
Block a user