Jump to content

Tidy erases whitespace on If-ElseIf lines with paranthesis inside brackets


Recommended Posts

I believe I have found a bug in the latest version of Tidy, which I have downloaded from the Scite4Autoit website. Tidying the following code 

If $a[1 - function('')] Then
ElseIf $a[fucntion()] Then
ElseIf $a[(0)] Then
ElseIf $a[function() - 0] Then
ElseIf $a[function(0)] = 1 Then
EndIf

will erase the whitespace between the closing brackets and the then keyword whenever the last expression is a function. This also occurs on ElseIf lines, and results in this code: 

If $a[1 - function('')]Then
ElseIf $a[function()]Then
ElseIf $a[(0)]Then
ElseIf $a[function() - 0] Then
ElseIf $a[function(0)] = 1 Then
EndIf

Which does not run. Should I submit a bug report on the autoit bugtracker? For now I can either use the #Tidy_on and #Tidy_off directives to skip these lines so that the source actually runs. 

[font=arial, sans-serif]How is education supposed to make me feel smarter? Besides, every time I learn something new, it pushes some old stuff out of my brain. Remember when I took that home winemaking course, and I forgot how to drive?[/font][font=arial, sans-serif]<div>This is how you annoy a web developer.</span>[/font]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...