Skip to content

Commit ba83c5e

Browse files
authored
Merge pull request #81 from watermarkhu/feat/fix-imports
Import with leading whitespace
2 parents f353382 + 0e579fe commit ba83c5e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Matlab.tmbundle/Syntaxes/MATLAB.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1766,7 +1766,7 @@
17661766
<key>name</key>
17671767
<string>meta.import.matlab</string>
17681768
<key>match</key>
1769-
<string>\b(import)\b[^\S\n]+([a-zA-Z0-9.\*]*)[^\S\n]*(?=;|%|$)</string>
1769+
<string>[^\S\r\n]*\b(import)\b[^\S\n]+([a-zA-Z0-9.\*]*)[^\S\n]*(?=;|%|$)</string>
17701770
<key>captures</key>
17711771
<dict>
17721772
<key>1</key>

test/t51Imports.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
% ^ punctuation.separator.matlab
2323
% ^^^^^^^^ entity.name.module.matlab
2424

25-
import module.*
26-
% <------ keyword.other.import.matlab
27-
% ^^^^^^ entity.name.module.matlab
28-
% ^ punctuation.separator.matlab
29-
% ^ variable.language.wildcard.matlab
25+
import module.*
26+
% ^^^^^^ keyword.other.import.matlab
27+
% ^^^^^^ entity.name.module.matlab
28+
% ^ punctuation.separator.matlab
29+
% ^ variable.language.wildcard.matlab

0 commit comments

Comments
 (0)