Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Matlab] Fixed the block comment scope for the Matlab syntax #650

Merged
merged 3 commits into from Nov 22, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Matlab/Matlab.sublime-syntax
Expand Up @@ -62,7 +62,7 @@ contexts:
scope: comment.double.percentage.matlab
captures:
1: punctuation.definition.comment.matlab
- match: '%\{'
- match: '%\{\s*\n'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex should be (%\{)\s*\n, so that the punctuation scope is applied to the %{.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though not changed by you, the match on line 72 should have () around the %\} also.

captures:
1: punctuation.definition.comment.matlab
push:
Expand Down
20 changes: 20 additions & 0 deletions Matlab/syntax_test_matlab.m
Expand Up @@ -56,4 +56,24 @@



%---------------------------------------------
% Block comment test

% Success case
%{
x = 5
% ^ source.matlab comment.block.percentage.matlab
%}

% Failure case
%{ fail
x = 5
% ^ source.matlab keyword.operator.symbols.matlab
%}

%{
%} fail
x = 5
% ^ source.matlab comment.block.percentage.matlab
%}