oxc/crates/oxc_prettier/src
underfin 989ab88bc6
fix(codegen): print Directive original string (#2157)
> A Use Strict Directive may not contain an EscapeSequence or
LineContinuation.

It is `Use Strict Directive` spec, but the `expression` of `Directive`
isn't original string value, it has error if using it to codegen, so
here using `directive` of `Directive` to codegen and not to escape it.
Here is crashed test cases.

``` js
'use str\
ict';
```
The babel will print the original string, I follow it and avoid using
`print_str` because it will escape string.

I also changed some code using the `expression` of `Directive` to check
`Use Strict Directive` .
2024-01-25 15:24:05 +08:00
..
comments feat(prettier): implement has_comment, improve blank lines when printing arrays (#1601) 2023-12-01 20:52:26 +08:00
format fix(codegen): print Directive original string (#2157) 2024-01-25 15:24:05 +08:00
printer feat(prettier): print CallExpression arguments correctly (#1631) 2023-12-10 15:59:13 +08:00
utils feat(prettier): print CallExpression arguments correctly (#1631) 2023-12-10 15:59:13 +08:00
binaryish.rs feat(prettier): add print_binaryish_expressions (#1664) 2023-12-13 22:52:53 +08:00
doc.rs fix(prettier) add missing closing brace for dock debug (#1786) 2023-12-23 10:59:13 +08:00
lib.rs feat(linter): no-irregular-whitespace rule (#1835) 2023-12-31 12:05:38 +08:00
macros.rs feat(prettier): add ConditionalGroup command (#1635) 2023-12-07 20:12:45 +08:00
needs_parens.rs chore: upgrade rustc toolchain to stable 1.75.0 (#1853) 2023-12-29 12:20:51 +08:00
options.rs feat(tasks): add visualize_end_of_line (#1593) 2023-11-30 23:42:57 +08:00