Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove else from outdent triggers #42

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vitallium
Copy link
Collaborator

@vitallium vitallium commented Mar 4, 2025

Closes #39

Remove else from outdent triggers to indent the else keyword properly.

The else outdent is used for use cases with begin..rescue..else..end. Consider the following code block:

def test
  begin
    a
  rescue
    puts "Something went wrong!"
else
|#<= cursor position
end
before.mp4

Currently the else keyword is indented incorrectly but removing the else keyword from the indents triggers turns the same block into this:

def test
  begin
    a
  rescue
    puts "Something went wrong!"
  else
  |#<= cursor position
end
after.mp4

@cla-bot cla-bot bot added the cla-signed label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong indentation level for else keyword
1 participant