mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
not escape unicode char for import path string. (#39463)
* not escape unicode char for import path string. * fix test.
This commit is contained in:
parent
34adaaf6aa
commit
294a0406e3
@ -4139,7 +4139,8 @@ namespace ts {
|
||||
|
||||
function symbolToStringWorker(writer: EmitTextWriter) {
|
||||
const entity = builder(symbol, meaning!, enclosingDeclaration, nodeFlags)!; // TODO: GH#18217
|
||||
const printer = createPrinter({ removeComments: true });
|
||||
// add neverAsciiEscape for GH#39027
|
||||
const printer = enclosingDeclaration?.kind === SyntaxKind.SourceFile ? createPrinter({ removeComments: true, neverAsciiEscape: true }) : createPrinter({ removeComments: true });
|
||||
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
||||
printer.writeNode(EmitHint.Unspecified, entity, /*sourceFile*/ sourceFile, writer);
|
||||
return writer;
|
||||
|
||||
9
tests/cases/fourslash/quickInfoImportNonunicodePath.ts
Normal file
9
tests/cases/fourslash/quickInfoImportNonunicodePath.ts
Normal file
@ -0,0 +1,9 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @Filename: /江南今何在/tmp.ts
|
||||
//// export const foo = 1;
|
||||
|
||||
// @Filename: /test.ts
|
||||
//// import { foo } from "./江南/*1*/今何在/tmp";
|
||||
|
||||
verify.quickInfoAt("1", 'module "/江南今何在/tmp"');
|
||||
Loading…
x
Reference in New Issue
Block a user