We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents faaa84d + 267a427 commit a66edb2Copy full SHA for a66edb2
lib/ruby_lsp/requests/on_type_formatting.rb
@@ -88,10 +88,10 @@ def handle_statement_end
88
current_line = @lines[@position[:line]]
89
next_line = @lines[@position[:line] + 1]
90
91
- if current_line.nil? || current_line.blank?
+ if current_line.nil? || current_line.strip.empty?
92
add_edit_with_text(" \n#{indents}end")
93
move_cursor_to(@position[:line], @indentation + 2)
94
- elsif next_line.nil? || next_line.blank?
+ elsif next_line.nil? || next_line.strip.empty?
95
add_edit_with_text("#{indents}end", { line: @position[:line] + 1, character: @position[:character] })
96
move_cursor_to(@position[:line], @indentation + 3)
97
end
0 commit comments