JamesRitchie / language-matlab

MATLAB/Octave language support for Atom
15 stars 9 forks source link

indented multiline comments not formatted #33

Open bensmus opened 4 years ago

bensmus commented 4 years ago
function foo()
    %{
    comment line 1
    comment line 2
    %}
end

%{
comment line 3
comment line 4
%}

comment lines 1 and 2 are formatted as comments. comment lines 3 and 4 are not.

rlivings39 commented 4 years ago

This is fixed in the package https://atom.io/packages/language-matlab-octave. That's still being maintained for MATLAB syntax highlighting fixes. It uses the shared highlighting grammar: https://github.com/mathworks/MATLAB-Language-grammar/

That's the same grammar being used on GitHub so putting your code in a MATLAB block simulates the behavior you'd get:

function foo()
    %{
    comment line 1
    comment line 2
    %}
end

%{
comment line 3
comment line 4
%}