jwalton512 / vim-blade

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

Highlighting issue after <?php section #11

Closed tremby closed 10 years ago

tremby commented 10 years ago

Here's a new one for you... ;)

Input:

<div class="dropdown-box dropdown-list">
    <?php
    $featuredEvents = $mainMenu->children()->where('class', '=', 'featured-events')->firstOrFail();
    ?>
    {{ $featuredEvents->asHtml([], function($menuItem, $li) use ($featuredEvents) {
        // Skip submenus
        if ($menuItem->depth > $featuredEvents->depth + 1) {
            return false;
        }
        return $li;
    }); }}
</div>

Output: screen shot 2014-03-03 at 3 58 04 pm

jwalton512 commented 10 years ago

thanks for identifying. keep 'em coming :)

tremby commented 10 years ago

This one is actually not quite fixed, or there is something related. With the same code, indent it all by one or more tabs. (The original in my codebase is in by four or five.) The final line </div> is not highlighted correctly, but lines after that are okay.

screen shot 2014-03-04 at 10 14 40 am

jwalton512 commented 10 years ago

hmm -- thought i had it. will take another look. thanks for the follow up

tremby commented 10 years ago

Unindented (as in my original code in this ticket) it renders perfectly.

jwalton512 commented 10 years ago

@tremby 2 questions, are you pretty good with git? if so, would you be willing to test a branch to see if it solves your issue? -- my version of vim doesn't do any highlighting of the html at all (i use terminal mvim) image

tremby commented 10 years ago

Yeah, I'm super comfortable with git. What branch?

I use vim in the terminal (iterm2), also on a Mac (at work -- Linux at home) but I think mine is installed via homebrew. I use the default colour scheme in 256 colour mode, but with :set bg=dark. My terminal settings support italic and bold and vim is aware of this.

jwalton512 commented 10 years ago

@tremby branch is bugfix/11, thanks for being willing to assist!

tremby commented 10 years ago

screen shot 2014-03-04 at 10 14 40 am

Merge it in! Thanks!

tremby commented 10 years ago

Haha, wrong screenshot attached...

screen shot 2014-03-04 at 1 44 05 pm

jwalton512 commented 10 years ago

that looks good, right?

tremby commented 10 years ago

Yup, good to merge. Thanks again.

jwalton512 commented 10 years ago

Thank you sir!!