fix: escape module specifier for snippet after quoted (#53407)
This commit is contained in:
Родитель
1761a67ff8
Коммит
9f18c3fd9c
|
@ -1991,7 +1991,7 @@ function completionEntryDataToSymbolOriginInfo(data: CompletionEntryData, comple
|
|||
|
||||
function getInsertTextAndReplacementSpanForImportCompletion(name: string, importStatementCompletion: ImportStatementCompletionInfo, origin: SymbolOriginInfoResolvedExport, useSemicolons: boolean, sourceFile: SourceFile, options: CompilerOptions, preferences: UserPreferences) {
|
||||
const replacementSpan = importStatementCompletion.replacementSpan;
|
||||
const quotedModuleSpecifier = quote(sourceFile, preferences, escapeSnippetText(origin.moduleSpecifier));
|
||||
const quotedModuleSpecifier = escapeSnippetText(quote(sourceFile, preferences, origin.moduleSpecifier));
|
||||
const exportKind =
|
||||
origin.isDefaultExport ? ExportKind.Default :
|
||||
origin.exportName === InternalSymbolName.ExportEquals ? ExportKind.ExportEquals :
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"kind": "text"
|
||||
}
|
||||
],
|
||||
"insertText": "import { foo$1 } from \"./\\\\$foo\";",
|
||||
"insertText": "import { foo$1 } from \"./\\$foo\";",
|
||||
"replacementSpan": {
|
||||
"start": 0,
|
||||
"length": 8
|
||||
|
|
Загрузка…
Ссылка в новой задаче