diff --git a/blade.sublime-syntax b/blade.sublime-syntax index 4b2fd91..a296c6a 100644 --- a/blade.sublime-syntax +++ b/blade.sublime-syntax @@ -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 diff --git a/test.blade.php b/test.blade.php index 1e38b57..b834eaf 100644 --- a/test.blade.php +++ b/test.blade.php @@ -41,6 +41,8 @@ {{-- Inline PHP --}}
@php(custom_function()) + @php($bool = $var ?? false) + @php($bool = $bool ?: true)
@include('footer')