Skip to content

Commit

Permalink
Merge pull request #178 from kennith/add-helpers
Browse files Browse the repository at this point in the history
Add helpers added since Laravel 5.6
  • Loading branch information
Medalink authored Jan 16, 2019
2 parents cd82d27 + b374cb4 commit e28b531
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blade.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ contexts:
pop: true
- include: 'scope:source.php'

- match: '(\s{0}|^)(\@)\b(acfrepeater|auth|block|break|can|cannot|choice|case|component|continue|debug|each|elsecan|elsecannot|elseif|embed|extends|for|foreach|forelse|guest|hasSection|hipchat|if|isset|include|includeIf|includeWhen|inject|lang|layout|macro|macrodef|minify|partial|php|push|render|section|servers|set|slack|slot|stack|story|switch|task|unless|unset|while|wpposts|yield)\b(?=(|\s*|)\(\()'
- match: '(\s{0}|^)(\@)\b(acfrepeater|auth|block|break|can|cannot|choice|case|component|continue|dd|debug|dump|each|elsecan|elsecannot|elseif|embed|extends|for|foreach|forelse|guest|hasSection|hipchat|if|isset|include|includeIf|includeWhen|inject|lang|layout|macro|macrodef|method|minify|partial|php|push|render|section|servers|set|slack|slot|stack|story|switch|task|unless|unset|while|wpposts|yield)\b(?=(|\s*|)\(\()'
captures:
0: punctuation.section.embedded.php
2: constant.other.inline-data.html
Expand All @@ -102,7 +102,7 @@ contexts:
pop: true
- include: 'scope:source.php'

- match: '(\s{0}|^)(\@)\b(acfrepeater|auth|block|break|can|cannot|choice|case|component|continue|debug|each|elsecan|elsecannot|elseif|embed|extends|for|foreach|forelse|guest|hasSection|hipchat|if|isset|include|includeIf|includeWhen|inject|lang|layout|macro|macrodef|minify|partial|php|push|render|section|servers|set|slack|slot|stack|story|switch|task|unless|unset|while|wpposts|yield)\b(?=(|\s*|)\()'
- match: '(\s{0}|^)(\@)\b(acfrepeater|auth|block|break|can|cannot|choice|case|component|continue|dd|debug|dump|each|elsecan|elsecannot|elseif|embed|extends|for|foreach|forelse|guest|hasSection|hipchat|if|isset|include|includeIf|includeWhen|inject|lang|layout|macro|macrodef|method|minify|partial|php|push|render|section|servers|set|slack|slot|stack|story|switch|task|unless|unset|while|wpposts|yield)\b(?=(|\s*|)\()'
captures:
0: punctuation.section.embedded.php
2: constant.other.inline-data.html
Expand All @@ -114,7 +114,7 @@ contexts:
pop: true
- include: 'scope:source.php'

- match: '(\s{0}|^)(\@)\b(acfend|after|append|auth|break|breakpoint|continue|default|else|empty|endswitch|endafter|endauth|endblock|endcan|endcannot|endcomponent|endembed|endempty|endfor|endforeach|endforelse|endguest|endif|endisset|endmacro|endmarkdown|endminify|endpartial|endpush|endsection|endsetup|endslot|endstory|endtask|endunless|endwhile|guest|markdown|overwrite|parent|setup|show|stop|verbatim|endverbatim|wpempty|wpend|wpquery)\b'
- match: '(\s{0}|^)(\@)\b(acfend|after|append|auth|break|breakpoint|continue|csrf|default|else|empty|endswitch|endafter|endauth|endblock|endcan|endcannot|endcomponent|endembed|endempty|endfor|endforeach|endforelse|endguest|endif|endisset|endmacro|endmarkdown|endminify|endpartial|endpush|endsection|endsetup|endslot|endstory|endtask|endunless|endwhile|guest|markdown|overwrite|parent|setup|show|stop|verbatim|endverbatim|wpempty|wpend|wpquery)\b'
scope: custom.compiler.blade.php
captures:
0: punctuation.section.embedded.php
Expand Down
6 changes: 6 additions & 0 deletions test.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,3 +405,9 @@

{{-- Complex conditional inline --}}
<p class="first-class @if(($x == true) && ($y == "yes")) second-class @endif">Text</p>

{{-- Helpers --}}
@csrf
@dd('Compile the "dd" statements into valid PHP.')
@dump('Compile the "dump" statements into valid PHP')
@method('post')

0 comments on commit e28b531

Please sign in to comment.