Skip to content

Commit

Permalink
[ruby/irb] fix auto-indent after multiline string
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng authored and k0kubun committed Dec 26, 2022
1 parent 82ca477 commit f20aac5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/irb/ruby-lex.rb
Expand Up @@ -188,6 +188,7 @@ def find_prev_spaces(line_index)
if line_count >= line_index
return prev_spaces
end
next if t.event == :on_tstring_content || t.event == :on_words_sep
if (@tokens.size - 1) > i
md = @tokens[i + 1].tok.match(/(\A +)/)
prev_spaces = md.nil? ? 0 : md[1].count(' ')
Expand Down

0 comments on commit f20aac5

Please sign in to comment.