Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/rbs/rewriter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def replace_comment(comment, content:)
def delete_comment(comment)
location = comment.location or raise "Comment must have a location"
line_start = location.start_pos - location.start_column
line_end = location.end_pos + 1
line_end = location.end_pos
line_end += 1 if buffer.content[line_end] == "\r"
line_end += 1 if buffer.content[line_end] == "\n"
loc = Location.new(buffer, line_start, line_end)
rewrite(loc, "")
end
Expand Down
Loading