davidvarga / MBeautifier

MBeautifier is a MATLAB source code formatter, beautifier. It can be used directly in the MATLAB Editor and it is configurable.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code is broken on "clear -global varnames"

FlorianPfaff opened this issue · 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