oxc/crates/oxc_codegen
overlookmotel fe29fa4797
fix(codegen): correct sourcemaps when Windows line breaks + unicode (#2584)
Fix source mapping of Window-style line breaks in presence of Unicode chars.

`content.chars().nth(i + 1)` gets the `i + 1`th *char*, but `i` is a byte offset not a char offset.

The replacement `content.as_bytes().get(i + 1)` gets the `i + 1`th *byte*, and should also be faster as doesn't require iterating through `chars` again.
2024-03-04 12:27:28 +08:00
..
examples feat(codegen): add sourcemap (#2565) 2024-03-03 14:44:49 +08:00
src fix(codegen): correct sourcemaps when Windows line breaks + unicode (#2584) 2024-03-04 12:27:28 +08:00
tests feat(Codegen): Improve codegen (#2460) 2024-02-21 14:41:57 +08:00
Cargo.toml chore(deps): update rust crates (#2589) 2024-03-04 11:23:06 +08:00