Skip to content

Commit

Permalink
fix #105 @media should be followed by whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Feb 23, 2018
1 parent 23efb4e commit 8f9915b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion LESS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ contexts:
- include: comment-block
- match: '[a-zA-Z0-9_-]+'
scope: variable.other.css
- match: \s*((@)media)(?=.*?)
- match: \s*((@)media)(?=\s+.*?)
captures:
1: keyword.control.at-rule.media.css
2: punctuation.definition.keyword.css
Expand Down
7 changes: 7 additions & 0 deletions syntax_test_less.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
@background-color: hsl(30,100%,96%);
/* <- variable.declaration.less punctuation.definition.variable.less */
/* ^ variable.declaration.less */
@medialist-bg: @body-bg;
/* ^^^^^^^^^^ variable.declaration.less */
/* <- variable.declaration.less punctuation.definition.variable.less */
@media-list-bg: @body-bg;
/* ^^^^^^^^^^ variable.declaration.less */
/* <- variable.declaration.less punctuation.definition.variable.less */


filter,
/* ^ entity.name.tag.css */
Expand Down

2 comments on commit 8f9915b

@arnaudgaudin
Copy link

Choose a reason for hiding this comment

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

Thank you very much @braver !
This was a quite annoying bug, now it's perfect. Much better !
Cheers !

@braver
Copy link
Collaborator Author

@braver braver commented on 8f9915b Mar 1, 2018

Choose a reason for hiding this comment

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

Thanks for logging the issue in the first place, makes this plugin a lot better for everyone. 🎉

Please sign in to comment.