davidvarga / MBeautifier

MBeautifier is a MATLAB source code formatter, beautifier. It can be used directly in the MATLAB Editor and it is configurable.
GNU General Public License v3.0
478 stars 75 forks source link

`MIndenter/performIndenting` error #99

Closed casperdcl closed 3 years ago

casperdcl commented 3 years ago

Running MBeautifier on https://github.com/davidvarga/MBeautifier/blob/01c8e14/%2BMBeautifier/DirectiveChangeType.m:

Cell contents indices must be greater than 0

Error in MBeautifier.MIndenter/performIndenting (line 133)
                            if (strcmp(stack{end}, 'function'))
Error in MBeautify.formatFileNoEditor (line 53)
            text = indenter.performIndenting(text);
davidvarga commented 3 years ago

Fixed :)

casperdcl commented 3 years ago

Great @davidvarga! Though MBeautifier still fails to run on its own codebase because of #98