Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax coloration in html attributes #52

Closed
sdebacker opened this issue Mar 5, 2014 · 10 comments
Closed

Syntax coloration in html attributes #52

sdebacker opened this issue Mar 5, 2014 · 10 comments

Comments

@sdebacker
Copy link
Contributor

It would be great to have syntax coloration in html attributes. What do you think ?

@curtailment
Copy link

Came here to say the same thing. Highlighting does not work inside HTML comments, HTML attributes, or JavaScript strings.

@kuroisuna
Copy link

+1
Right now looks awful:
image

@sdebacker sdebacker changed the title Syntax coloration in html attibutes Syntax coloration in html attributes Mar 31, 2014
@sixpetrov
Copy link

I miss that feature so much. Currently is ugly as hell and I can't find solution.
Is it so hard to do this? I tried but without success.

@Medalink
Copy link
Owner

There is not currently a way to do this as far as I have been able to figure out. The reason is because Sublime uses a first come first serve hierarchy when parsing what get's highlighted. The blade highlighter depends on both the HTML highlighter and the PHP highlighter. The issue here is that the HTML highlighter is super greedy when it comes to parsing rules like this and by the time Blade tries Sublime ignores it. The only solution I can think of is to add in both the HTML/PHP highlighters myself and adjust them. But then I must maintain both of them which is far outside the scope of this project.

If anyone has ideas I would love to try them as this has been an issue for quite some time.

@empz
Copy link

empz commented May 21, 2014

I can't even get proper blade syntax highlighting... The {{ }} doesn't get colored properly...
image

And yes, I have set the syntax to Blade PHP..

@Medalink
Copy link
Owner

@emzero The syntax should be: PHP - Laravel Blade. Make sure you are on the latest version. Take a look at the README and make sure you are not using a conflicting package.

@sleeviin
Copy link

@emzero I have the same problem, please can you help me how fix it?, and @Medalink I am sure that I have the syntax PHP-Laravel Blade and still isn't fix. :(

@Medalink
Copy link
Owner

@sleeviin make sure you are not using a conflicting package.

@ctf0
Copy link

ctf0 commented Nov 17, 2014

also for something like

<link href="{{ asset('_css/main.css') }}" rel="stylesheet" media="screen, projection">

everything inside the double quotes is treated the same ,i think we need a regex inside the blade tmlang to detect something like the {{ }} and give it a proper HL.

@zaynali53
Copy link
Contributor

@Medalink This issue has been resolved f338c41

However, Most color schemes don't highlight these kind of edge cases. Only highlights generic scopes in the code so you won't find the difference.

For this reason, i made a new color scheme, focused heavily on JSX (React), ES6 and Laravel Blade.

Acme Color Scheme

capture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants