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

Nested if else #276

Closed
ghost opened this issue Jun 24, 2016 · 6 comments
Closed

Nested if else #276

ghost opened this issue Jun 24, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Jun 24, 2016

I learned how to use source code markup! It's pretty useable. Previously I had tried to paste code with inline syntax.
So this nested conditions

if 1
  if 2
    3
  elseif 4
    5
else 6

Become to this:

if 1 then
  if 2 then
    return 3
  elseif 4 then
    return 5
  else
    return 6
  end
end

It is confusing, fix please

@TangentFoxy
Copy link

The 6 should be on the next line.

if 1
    if 2
        3
    elseif 4
        5
else
    6

Turns into

if 1 then
  if 2 then
    return 3
  elseif 4 then
    return 5
  end
else
  return 6
end

@ghost
Copy link
Author

ghost commented Jun 26, 2016

Thanks, Guard, it works!

@ghost ghost closed this as completed Jun 26, 2016
@TangentFoxy
Copy link

I still think something should be done about this, because that syntax should error or be interpreted correctly.

@ghost
Copy link
Author

ghost commented Jun 28, 2016

I can reopen issue and leafo maybe fix it. But with new line it works, and leafo has many projects and more important things, so, should I reopen it? Ok, let it be open.

@ghost ghost reopened this Jun 28, 2016
@TangentFoxy
Copy link

At the very least I think we should get his opinion on it. @leafo Thoughts?

On Jun 28, 2016 8:26 AM, "Romaboy" notifications@github.com wrote:

I can reopen issue and leafo maybe fix it. But with new line it works, and
leafo has many projects and more important things, so, should I reopen it?
Ok, let it be open.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#276 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AOZPPynSE5872bnbAh-uZg9EUyCyvNeeks5qQT0bgaJpZM4I99Ht
.

@leafo leafo closed this as completed in 2f1dd92 Sep 25, 2016
@leafo
Copy link
Owner

leafo commented Sep 25, 2016

parsing error, fixed for next release. Thanks

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

2 participants