Atom-beautify: Support for ASP.NET Razor / .cshtml

Created on 29 Oct 2015  路  5Comments  路  Source: Glavin001/atom-beautify

I would LOVE to beautify my .cshtml :)

add-beautifier add-language duplicate

Most helpful comment

I could extend the HTML parser in Pretty Diff so that @{ is treated as an open script tag and } is treated as the closing script tag. We can also investigate adding the language-cshtml package.

All 5 comments

I am looking at http://weblogs.asp.net/scottgu/introducing-razor

Could you please test a whole bunch of your code samples at http://prettydiff.com/ ? I am thinking this code could just be beautified as HTML, and if so, then we only have to add support for a new file extension.

@prettydiff

I am thinking this code could just be beautified as HTML

There are some special syntax with @, for instance:

@Html.Partial("some_file")

http://www.w3schools.com/aspnet/razor_syntax.asp pretydiff.com broke this cshtml.

.cshtml language package exist https://github.com/demyte/language-cshtml, may be it can help for beautify supporting?

I could extend the HTML parser in Pretty Diff so that @{ is treated as an open script tag and } is treated as the closing script tag. We can also investigate adding the language-cshtml package.

It would be great!
But @{ and } isn't enough, see example:
screenshot_082216_034445_pm

Was this page helpful?
0 / 5 - 0 ratings