-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
New language - CSHTML Razor #1631
Conversation
The modified version of highlight.js (with Razor support implemented in this PR) is used on the following site: https://demos.devexpress.com/aspnetcore-bootstrap/GridView-Templates. You can obtain more examples of Razor code highlighting on other pages of this site (use the left navigation panel to find all demos). |
Hi @marcoscaceres . Would you please review this PR? |
Hi @romanresh, we are looking at splitting languages out into their own repositories. If make you a repository within this hljs organization, would you be willing to maintain the language? |
Yeah sure. Anyway, I need the razor support in hljs because I use it in the demos of my projects. So, I'm ready to maintain it. |
Should I do smth to help you with the new repository? Feel free to contact me for any assistance. |
no, I’ll set things up for you. What’s a good name for the repo? “cshtml-razor”? |
yes, "cshtml-razor" is OK. |
sorry it too me a little long to get to this, @romanresh. Now done. Check your inbox. |
Closing as this now has its own repo. https://github.com/highlightjs/highlightjs-cshtml-razor |
This PR contains a parser for the Razor CSHTML language. CSHTML is a markup language created by Microsoft for ASP.NET MVC and ASP.NET Core applications. It allows to create markup containing both C# and HTML code.
If a cshtml file contains only HTML markup and doesn't contain any razor expressions or C# code its content will be rendered as plain HTML text.
See more about the CSHTML Razor syntax here: https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor.