Skip to content

U+2028/U+2029 inside a multi-line comment leaves 2 stray bytes in emitted JS (invalid UTF-8) #4119

@mds-ant

Description

@mds-ant

Steps to reproduce

Create main.ts:

printf '/* a\342\200\250b */ const x = 1;\n' > main.ts
tsgo --pretty false main.ts main.ts

Behavior with typescript@6.0

"use strict";
/* a
b */ const x = 1;

Behavior with tsgo

"use strict";
/* a�
b */ const x = 1;

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions