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

Wrong indentation for else #69

Open
narimiran opened this issue Oct 15, 2017 · 1 comment
Open

Wrong indentation for else #69

narimiran opened this issue Oct 15, 2017 · 1 comment

Comments

@narimiran
Copy link

Consider a function

proc a(b: int): int =
  if b == 1:
    return b
  else:
    return b+1

Written like the above, everything works as expected.

But if you have if part on the same line, like this:

proc a(b: int): int =
  if b == 1: return b

writing else: and pressing enter, else: gets de-indented, like this:

proc a(b: int): int =
  if b == 1: return b
else:
@ghost
Copy link

ghost commented Jan 30, 2018

The same happens for an else in a case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant