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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 241f449c7d85bd172dd1f14e69f2dd3c3baf9a2590d932a81437bcb7256697e9
4
- data.tar.gz: 486cc137199d7a8e0fbda04baf528f139abd43585870108305ca9ece45f99a6e
3
+ metadata.gz: 858b6bd700e41b846fc44258e8a702bb8f32f25d952a3c64c1468500619c92f0
4
+ data.tar.gz: 4bbe6e97e5726844fd6135fcb148d486d01c196e33e4c1ef200f088fb79ed1a0
5
5
  SHA512:
6
- metadata.gz: 78b9b224b0c202d58ab0f707f9333d8972298b11b707e735efd8f8da58eb93b21c24061f5a2b6fc0ea2fb207e2840df83351b6759a4ae8372d84391a390813c7
7
- data.tar.gz: faf509cd68a7f7eb35f2e826a3bdc514681afad57e8900ce079269b58ec4d5321d5cba66e1aee7199f8eeb59eec0a58cf97bcc0440e142e351a0ea846f618a22
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
- 0
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 + code_line.strip.length)
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),
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module SorbetView
5
- VERSION = '0.17.1'
5
+ VERSION = '0.17.2'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorbet_view
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.1
4
+ version: 0.17.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kazuma