jwalton512 / vim-blade

Vim syntax highlighting for Blade templates.
225 stars 37 forks source link

Issue highlighting PHP inside @if statement #12

Closed tremby closed 10 years ago

tremby commented 10 years ago

Input:

@section('title')
    @if ($document->get($document->getType() . '.page_title')->asText())
        {{{ $document->get($document->getType() . '.page_title')->asText() }}}
    @else
        {{{ $document->get($document->getType() . '.title')->asText() }}}
    @endif
@endsection

Highlighting as screen shot 2014-03-04 at 3 05 03 pm

The code in the @if statement is not highlighting properly.

tremby commented 10 years ago

I've a feeling this one is related:

                        <p>
                            <em>
                                {{{ $address }}}
                                @if ($address && $document->getMyText('phone'))
                                    <br/>
                                @endif
                                @if ($document->getMyText('phone'))
                                    T: <a href="tel:{{{ $document->getMyText('phone') }}}">{{{ $document->getMyText('phone') }}}</a>
                                @endif
                                @if ($document->getMyText('phone') && $document->getMyText('email'))
                                    |
                                @endif
                                @if ($document->getMyText('email'))
                                    E: <a href="mailto:{{{ $document->getMyText('email') }}}">{{{ $document->getMyText('email') }}}</a>
                                @endif
                            </em>
                        </p>

Highlighting as screen shot 2014-03-04 at 5 30 00 pm

Note in particular:

tremby commented 10 years ago

Thanks!