mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 10:12:42 +03:00
fix(common): Fix column positions in generated sourcemaps (#1470)
Co-authored-by: 강동윤 <kdy1@dudy.kr>
This commit is contained in:
parent
a90368372f
commit
9d53a70221
@ -6,7 +6,7 @@ edition = "2018"
|
||||
license = "Apache-2.0/MIT"
|
||||
name = "swc_common"
|
||||
repository = "https://github.com/swc-project/swc.git"
|
||||
version = "0.10.12"
|
||||
version = "0.10.13"
|
||||
|
||||
[features]
|
||||
concurrent = ["parking_lot"]
|
||||
|
@ -1061,8 +1061,9 @@ impl SourceMap {
|
||||
pos,
|
||||
linebpos,
|
||||
);
|
||||
let chpos = { self.calc_extra_bytes(&f, &mut ch_start, pos) };
|
||||
let linechpos = { self.calc_extra_bytes(&f, &mut line_ch_start, linebpos) };
|
||||
let chpos = pos.to_u32() - self.calc_extra_bytes(&f, &mut ch_start, pos);
|
||||
let linechpos =
|
||||
linebpos.to_u32() - self.calc_extra_bytes(&f, &mut line_ch_start, linebpos);
|
||||
|
||||
let mut col = max(chpos, linechpos) - min(chpos, linechpos);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user