Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added BOM detection and BOM marker removal
If a source code uses encoding with BOM marker, this marker becomes a part of a prefix in a JS.CompilationUnit. During the equality check on the Java side (org.openrewrite.Parser.requirePrintEqualsInput) between the source code and the code generated based on the LST, Java trims the BOM marker. So this causes an idempotency error. Therefore, we also detect and trim the BOM marker on a JS/TS parser side from JS.CompilationUnit prefix.
- Loading branch information