-
Notifications
You must be signed in to change notification settings - Fork 0
if
statements with curly braces inside web forms don't highlight properly
#5
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
Comments
Is this even something that can be addressed in this package, or would it require changes in the c sharp language package? |
That's a good question. It's been a while since I worked on this (and even then, a lot of it is copied and pasted), but I believe all the highlighting between <% %> is handed off to the C# highlighter, which may or may not deal well with the fragments of C# you get in as*x files. |
I just did a little testing with the built in PHP highlighting in Atom, and it handles this scenario just fine. I haven't looked into why it works better in that language, but I suspect that the answer will make itself clear inside that package's code. Maybe @shiftkey has some insight? Or @mnquintana? |
I made a new language package called ASP HTML to address this issue for myself. Started with the PHP package above and just made a few changes. It works well for this issue, though it is still, at heart, looking for PHP code. Maybe it can help you going forward. |
@happycollision Glad you found a solution. I'm not likely to make changes to this code. I don't use Atom anymore and this is almost entirely a port of grammars and config from Sublime (I think?). If you or anyone else is interested in taking it over, I'm open to that. |
I haven't looked into this (the other examples in the package build upon the C# grammar, and wrapping HTML around the C# might totally confuse things), but perhaps modifying the grammars to look at these extensions might get you some of the way: https://github.com/atom/language-csharp/blob/master/grammars/c%23.cson There's examples of incorporating other extensions which extend the C# syntax a bit in the source: https://github.com/atom/language-csharp/blob/master/grammars/csx.cson |
Just FYI in an

ascx
file:The text was updated successfully, but these errors were encountered: