recast/lib
Devin J. Pohly 7767878ff9 Fix pretty-printing strings with \u2028 or \u2029
These two characters are considered ordinary characters by JSON but line
terminators by ECMAScript (prior to ES2019).  When pretty-printing a
string containing either character, JSON.stringify leaves it unescaped.
The result in recast.prettyPrint is that fromString, which follows
ECMAScript definitions, converts it mistakenly to a newline character.

Escaping these characters manually when the intent is to generate
ECMAScript (rather than JSON) eliminates the problem.
2022-02-03 14:28:04 -06:00
..
comments.ts Reformat lib/comments.ts with Prettier. 2020-08-30 12:33:55 -04:00
fast-path.ts Allow pretty-printing Flow [Optional]IndexedAccessType AST nodes. 2021-12-02 15:12:44 -05:00
lines.ts Reformat codebase with printWidth:80 instead of 100. 2020-08-24 11:43:55 -04:00
mapping.ts Reformat codebase with printWidth:80 instead of 100. 2020-08-24 11:43:55 -04:00
options.ts Reformat codebase with printWidth:80 instead of 100. 2020-08-24 11:43:55 -04:00
parser.ts Reformat codebase with printWidth:80 instead of 100. 2020-08-24 11:43:55 -04:00
patcher.ts Reformat codebase with printWidth:80 instead of 100. 2020-08-24 11:43:55 -04:00
printer.ts Fix pretty-printing strings with \u2028 or \u2029 2022-02-03 14:28:04 -06:00
util.ts Reformat codebase with printWidth:80 instead of 100. 2020-08-24 11:43:55 -04:00