Coder Social home page Coder Social logo

medalink / laravel-blade Goto Github PK

View Code? Open in Web Editor NEW
419.0 17.0 102.0 525 KB

This package adds syntax definitions for the Laravel Blade engine.

Home Page: http://www.laravel.com

License: MIT License

CSS 64.35% JavaScript 35.65%
sublime-text blade-engine highlighter php laravel laravel5

laravel-blade's People

Contributors

alexwhitman avatar anlutro avatar autokludge avatar corneliusio avatar cringerjs avatar deathaxe avatar dmitrybubyakin avatar heavybeard avatar intrepidws avatar jakebathman avatar jaybizzle avatar jbrooksuk avatar joostk avatar kennith avatar leonimuz avatar mc0de avatar medalink avatar patricksamson avatar pazuzu156 avatar pcr-coding avatar pephers avatar piperone avatar redgluten avatar sdebacker avatar tannermccoleman avatar taylorotwell avatar thyyppa avatar uzegonemad avatar vinkla avatar zaynali53 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-blade's Issues

Problem with highlighting for {{ $var }}

Hello and first of all thanks for this wonderful highlighter for blade.

But I have a small issue where {{ $var }} is not highlighted the way it should.
Although it is highlighted but not in PHP style but just in raw text style which is not so handy.

You can see an example at the screen shot.

screenshot from 2013-07-08 16 45 47

Thanks in advance,

Juje007

Documentation tweak

Could you please update the ReadMe to be clearer that the HTML_5_ package is incompatible with laravel-blade.

It does say HTML, but it was only when I moused over it that I noticed it was the HTML5 package.

Otherwise, great package, thanks for contributing!

Mixing Blade and HTML Comments

If I place HTML comments inside Blade comments, I lose syntax highlighting.

{{--
<!-- Some HTML Comment -->
@include('something')
--}}

screen shot 2013-08-12 at 2 27 16 pm

Didn't work for .blade.php :(

Thanks for this plugin. However, it only works for .blade, but as soon as I change to .blade.php, it didn't work.

Any solutions?

{!! !!} Syntax not being highlighted

The new raw html {!! !!} tags are not being highlighted. I'm using version v.1.1.3 and Sublime Text 3.

Sublime

Edit: Noticed the actual commit was a revert, so I guess this is a feature request now.

include highlighting

Noticed that while using the new array syntax that the highlighter breaks if you use parentheses.
screen shot 2014-10-10 at 12 41 17 am

Highlighting issue

This particularly bad piece of code causes a parsing issue.

Notice "SeriesForm" and "ProgramForm" not being colored.

Blade highlighting not working at all

I'm on Windows 7 64-bit with ST2. I've installed Laravel Blade Highlighter using Package Control but it doesn't work at all. I don't have the HTML5 package installed. The color scheme is Monokai. All other html/php highlighting appears normal.

Any ideas?

Sorry - it's woken up! The problem was that I had files already open in ST2 and they didn't update. As soon as I closed and re-opened them, I was cooking.

.blade.php is not recognized

I have this issue using TextMate 2.0 beta 6

In fact I always had this issue : file.blade.php are not recongized as blade until you select the Blade syntax. Then textmate remembers your choice for this only file and use Blade everytime you open the file, but the extension detection does not work for a reason I can't figure out.

Am I alone ? Did I miss something ?

Syntax highlighting issue

Syntax highlighting does not seem to pick up the opening {{ inside an HTML tag

Line 2 is the correct formatting
Line 3 shows the same code inside a tag which is unstyled

The correct behaviour would be to style the code inside the HTML tags

screen shot 2013-10-17 at 10 36 12

No forelse support yet

Hi Medalink,

thanks for your Blade Highlighting Plugin.
I've encountered, that highlighting for forelse is missing.

Only small changes need to be made. For the case you are too busy, feel free to paste this fixes for laravel-blade.tmLanguage:
Line 114: <string>\s{1}|^)@\b(if|elseif|foreach|for|forelse|while|extends|unless|each|yield|lang|choice|section|include)\b(?=(|\s*|)()</string>
Line 195: <string>\s{1}|^)@\b(endif|endforeach|endfor|endforelse|endwhile|else|empty|endunless|show|stop|endsection|parent|overwrite)\b</string>

Custom escape sequence

I've tried to highlight the "<%" and "%>" as an addition to the regular syntax "{{ }}", but it didn't work out for me. what would I need to add to the tmLanguage file to make it work?

The mustache PHP highlighting don't work inside quotation marks

The PHP code is highlighted when it is into the "mustaches" of blade except when this mustaches are inside quotation marks. This case is very frequent when you want to define dynamic data (for a JS function, for example) or class in HTML markup.

In the exemple below, GitHub Highlighting do the same :

<button id="delete-user" data-user="{{ $user->id }}">
    Delete {{ $user->name }}
<button>

Is there a solution to improve this ?

Updated syntax for Laravel 4

I've updated some of the blade syntax for Laravel 4. If you'll add another branch for Laravel 4 I'll be happy to create a pull request to it :)

@show breaks laravel-blade

For some odd reason whenever i put

    <style>
    @section('styles')
    @show
    </style>

it breaks everything after it

it looks like this happens whenever the blade is inside the style tag

HTML Blade Parsing Issue

<a href="{{ URL::to_action('intake@program_selection') }}">

In this scenario the {{}} and contents are highlighted as if they are within the HTML anchor href quotes.

Commenting

Most packages allow CMD+/ to comment out the current selection line-by-line (with // in PHP, for example), or OPT+CMD+/ to comment it out in a block (e.g. /* ... */).

It would be great for your package to do this as well!

Comment Issue

When I made a comment
{{-- --}}
It doesn't appear correctly

Render Issues

        <div class="control-group">
            {{ Form::submit('Login', array('class' => 'btn btn-primary')) }}&nbsp;&nbsp;{{ HTML::link('forgotpassword', "Can't remember your password?") }}
        </div>

something begins at array( and ends at {{ HTML::

Whitespace before @ issue

Notice how the tab before the @ are highlighted, and the behaviour of the following...

The issue is probably with the regexes that go like this (\s{1}|^)\@\b(if|else|...)\b(?=(|\s*|)\()

But I cannot figure out how to make that first whitespace non-capturing.

Error opening Sublime

Hi Guys

I've started getting the following error opening Sublime:

Error loading syntax file "Packages/Laravel-Blade/Blade.tmLanguage": Error parsing plist xml: Failed to open file In file "Packages/Laravel-Blade/Blade.tmLanguage"

I tried deleting the package to reinstall it but still getting the message. Any ideas?

Disable blade comments

Is there a way to revert "blade style comments" that were introduced in v1.5.2 or a way to use v1.5.1 without manually installing your package?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.