sorbet_view 0.17.1 → 0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sorbet_view/compiler/ruby_generator.rb +5 -3
- data/lib/sorbet_view/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 858b6bd700e41b846fc44258e8a702bb8f32f25d952a3c64c1468500619c92f0
|
|
4
|
+
data.tar.gz: 4bbe6e97e5726844fd6135fcb148d486d01c196e33e4c1ef200f088fb79ed1a0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 48c1d98ade67fdb02c84c7650c985fe97ba35e38bdd7973fdb2586bfc4cd89e4fd654435cf5d3e9f8d6b07129cf2573ac76b10c4a857db3f919e92333a6b6b79
|
|
7
|
+
data.tar.gz: fb8bd91ca32e0473c1a533adbf3211d4c75ddbd8283bfc980ac9497c24acb3548efd7007d13d8ae771667753fbaec1951a4215a0cf94592a959c56770288710e
|
|
@@ -117,17 +117,19 @@ module SorbetView
|
|
|
117
117
|
|
|
118
118
|
lines << " #{stripped}"
|
|
119
119
|
|
|
120
|
-
# Build mapping entry
|
|
120
|
+
# Build mapping entry — for the first line we already advanced past
|
|
121
|
+
# leading whitespace in the adapter; for subsequent lines, use the
|
|
122
|
+
# actual indent of the source line so the template column matches.
|
|
121
123
|
template_start_col = if i == 0
|
|
122
124
|
seg.column
|
|
123
125
|
else
|
|
124
|
-
|
|
126
|
+
code_line.length - code_line.lstrip.length
|
|
125
127
|
end
|
|
126
128
|
|
|
127
129
|
mapping_entries << SourceMap::MappingEntry.new(
|
|
128
130
|
template_range: SourceMap::Range.new(
|
|
129
131
|
start: SourceMap::Position.new(line: seg.line + i, column: template_start_col),
|
|
130
|
-
end_: SourceMap::Position.new(line: seg.line + i, column: template_start_col +
|
|
132
|
+
end_: SourceMap::Position.new(line: seg.line + i, column: template_start_col + stripped.length)
|
|
131
133
|
),
|
|
132
134
|
ruby_range: SourceMap::Range.new(
|
|
133
135
|
start: SourceMap::Position.new(line: ruby_line, column: 4),
|
data/lib/sorbet_view/version.rb
CHANGED