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

New language - CSHTML Razor #1631

Closed
wants to merge 5 commits into from
Closed

Conversation

romanresh
Copy link
Contributor

@romanresh romanresh commented Nov 8, 2017

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.

@romanresh
Copy link
Contributor Author

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).

@romanresh
Copy link
Contributor Author

Hi @marcoscaceres . Would you please review this PR?

@marcoscaceres
Copy link
Contributor

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?

@romanresh
Copy link
Contributor Author

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.

@romanresh
Copy link
Contributor Author

romanresh commented Oct 5, 2018

Should I do smth to help you with the new repository? Feel free to contact me for any assistance.

@marcoscaceres
Copy link
Contributor

no, I’ll set things up for you. What’s a good name for the repo? “cshtml-razor”?

@romanresh
Copy link
Contributor Author

yes, "cshtml-razor" is OK.
Perhaps, the "vbhtml-razor" will also appear in a while, if there is enough interest.

@marcoscaceres
Copy link
Contributor

sorry it too me a little long to get to this, @romanresh. Now done. Check your inbox.

@marcoscaceres
Copy link
Contributor

Closing as this now has its own repo. https://github.com/highlightjs/highlightjs-cshtml-razor

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

Successfully merging this pull request may close these issues.

None yet

2 participants