Closed mauriciojxs closed 7 years ago
The issue is caused by having a comment at the end of an If ... Then
statement. In particular, this line:
If a < arrayMax Then 'not in the end of the array
Removing the comment will mean that the module correctly indents.
The error is caused by the isOneLineIfStatemt
function thinking the line is a "one line if statement" because it doesn't end with Then
. I think any trailing comments need to be stripped off the line before checking it's syntax and then added back.
Nice catch! I moved the comment to the next line, and worked like a charm.
Thanks!
Hello @hilkoc
The
format
function is not able to process the code below:From what I see, it's trying to align the "Exit Do" at the same indent as the "Do While", making the "Loop" to have the indent reduced. It is throwing the error below:
Best regards, Mauricio