Skip to content

Commit

Permalink
Merge pull request #181 from dmitrybubyakin/master
Browse files Browse the repository at this point in the history
Fix @php highlighting of the null coalescing and shorthand ternary operators
  • Loading branch information
Medalink authored Jun 25, 2019
2 parents 6c4c6cb + dd32c6a commit 54a49c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blade.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ contexts:
0: punctuation.section.embedded.end.blade
pop: true
- include: 'scope:source.php'
- match: '((\s{0}|^)(@)(php)(?![^?]*\(*\))|<\?(?i:php|=)?)(?![^?]*\?>)'

- match: '((\s{0}|^)(@)(php)(?!.*\(*\))|<\?(?i:php|=)?)(?![^?]*\?>)'
scope: punctuation.section.embedded.begin.php
captures:
0: punctuation.section.embedded.begin.php
Expand Down
2 changes: 2 additions & 0 deletions test.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
{{-- Inline PHP --}}
<div class="container">
@php(custom_function())
@php($bool = $var ?? false)
@php($bool = $bool ?: true)
</div>

@include('footer')
Expand Down

0 comments on commit 54a49c8

Please sign in to comment.