davidvarga/MBeautifier

Code is broken on "clear -global varnames"

FlorianPfaff opened this issue · 2 comments

Hi,

thanks for this very nice tool. I just wanted to report that it broke some code. I had a line
clear -global x y
in my code and it made
clear - global x y
out of it. Matlab then did not execute the code due to the illegal use of the global keyword.

I just thought I would let you know in case you want to fix this. A good fix would be to prevent that strings involving keywords (global, persistent, for, if, else, while, end) that do not start with the keyword itself are broken up because it will certainly change how Matlab interprets the code.

Thanks again for the great tool,

Florian

Hi Florian,

are you still able to reproduce this?

Thanks,
David

Hi David,

no, it looks fine now. Thanks a lot for your efforts!

Best wishes,

Florian