-
Notifications
You must be signed in to change notification settings - Fork 21
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
Incorrect syntax highlighting of {{ }}
statements
#94
Comments
Hi! Thank you for the issue report. I can explain what the differently highlighted curly bracket was used for. In Atom when someone typed To remedy this, I used a trick that I saw in some other TextMate grammar, where the first character of the closing token was scoped the same as the contents would have been (source.php). To fix any potential visual inconsistencies, we added some custom styles to reset the styles for that token. The case you have provided was likely never tested against GitHub Linguist and it's fair to assume that they should not be supporting the Atom-specific CSS overrides to accommodate the same hack, which leads to possible options to solve this particular use case:
I'll try researching these options sometime soon, but in meantime I welcome any thoughts or feedback regarding the direction we should be taking. |
Hi, thanks for the quick and detailed response. I'm always curious to know why things behave in a specific way, and your explanation makes a lot of sense to me! Regarding your three options I have the following thoughts:
Alternative solutionsAFAIK GitHub Linguist supports various types of syntax definitions. The main types being Text Mate ( I've found some discussions about Sublime's new syntax files being (un-)supported by Linguist, but I cannot exactly tell if the syntax is supported as of today. Note: There might also be tools available to convert one file format to the other. Regardless, here are some relevant repositories I have found:
There are also some other Laravel Blade VS Code extensions available with a couple of 100k downloads, but those seem to be less maintained or even completely unmaintained. Some of them are even converted from the definitions in your repository (laravel-blade, Laravel Blade). ConclusionThe most straightforward solution would be to remove everything related to Atom from this repository and wait for GitHub Linguist to catch up. Note: The people contributing to Linguist are usually pretty quick when it comes to responding and deciding on such topics. I just saw such a replacement being done for the |
There is an issue when using the
{{ }}
statement in blade files. The first closing curly bracket is not highlighted correctly when the statement is used inside of HTML attribute values.Example:
Note
I came across this issue while browsing some blade files in our GitHub repository. GitHub is using your package for highlighting blade files, see: https://github.com/github-linguist/linguist/blob/main/vendor/README.md.
The text was updated successfully, but these errors were encountered: