Skip to content

Commit

Permalink
Fix @php highlighting of the null coalescing and shorthand ternary op…
Browse files Browse the repository at this point in the history
…erators
  • Loading branch information
dmitrybubyakin committed Jun 9, 2019
1 parent cb2574f commit dd32c6a
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 dd32c6a

Please sign in to comment.