kirbysayshi/vash

Having a new line after the 'else' keyword fails to recognise else block

Closed this issue · 7 comments

@if(true)
{
     <strong>Hello</strong>
}
else
{
     <strong>World!</strong>
}

Outputs:

Hello else { World! }

Definitely a bug, I'll try to get to this tonight.
On Mon, Jun 29, 2015 at 11:26 PM Sam notifications@github.com wrote:

@if(true)
{
Hello
}
else
{
World!
}

Outputs:

Hello else { World! }


Reply to this email directly or view it on GitHub
#82.

Hey @ichpuchtli, I just tried reproducing this, and could not. What version of vash are you using?

I've been able to reproduce it in this jsfiddle.

https://jsfiddle.net/jvvc7od2/1/

I've just copied 0.9.2 into the javascript section with the compile code below that.

If you collapse the else state back so it's } else { it works fine.

Thanks for the test case! The problem was more due to the combination of whitespace (the indent) + newline. This fix is published as v0.9.3!

+1 fastest bug fix ever. Keep up the good work.

Thanks! Sorry it was a bug at all :S
On Wed, Jul 1, 2015 at 1:33 AM Sam notifications@github.com wrote:

+1 fastest bug fix ever. Keep up the good work.


Reply to this email directly or view it on GitHub
#82 (comment).