mirror of
https://github.com/swc-project/swc.git
synced 2024-12-27 15:42:51 +03:00
a203fdb1b6
**Description:** This fixes the BytePos -> CharPos calculation necessary for source maps. There were a few issues in the old code: 1. UTF-8 maps 1-3 bytes into 1 UTF-16 char, but 4 bytes into 2 UTF-16 chars 2. The starting offset was not recorded when we reached the end of the `multibyte_chars` iteration 3. The `mappings` can be unordered, meaning we need to restart the UTF-16 offset calculation **Related issue:** - Closes https://github.com/swc-project/swc/issues/6552. |
||
---|---|---|
.. | ||
babelify | ||
swcify | ||
lib.rs |