MVC Razor Prettify

105 views
Skip to first unread message

Chiramisu

unread,
May 5, 2016, 12:25:40 PM5/5/16
to js-code-prettifier
I'm actually quite surprised to see that after years of MVC Razor being a very popular view engine, it is still not supported by this also very popular code syntax highlighter. Is this planned for the near future, and if not, why not?

Mike Samuel

unread,
May 5, 2016, 12:29:20 PM5/5/16
to js-code-p...@googlegroups.com, chira...@gmail.com

What would support entail?

On May 5, 2016 12:25 PM, "Chiramisu" <chira...@gmail.com> wrote:
I'm actually quite surprised to see that after years of MVC Razor being a very popular view engine, it is still not supported by this also very popular code syntax highlighter. Is this planned for the near future, and if not, why not?

--
You received this message because you are subscribed to the Google Groups "js-code-prettifier" group.
To unsubscribe from this group and stop receiving emails from it, send an email to js-code-prettif...@googlegroups.com.
To post to this group, send email to js-code-p...@googlegroups.com.
Visit this group at https://groups.google.com/group/js-code-prettifier.
For more options, visit https://groups.google.com/d/optout.

Chiramisu

unread,
May 14, 2016, 3:27:43 PM5/14/16
to js-code-prettifier, mikes...@gmail.com
Hi Mike, thanks for your reply. Since the Razor view is basically just a mixture of C# code HTML, I think syntax highlighting should be accomplished relatively easily. Visual Studio manages to do it of course, so perhaps the highlighting rules could be copied from them. Honestly I haven't looked into how it all works, so I'm just throwing out ideas, but it would be great if prettify could highlight MVC Razor View syntax the same as Visual Studio. :D

Cheers!
Matthew

Chiramisu

unread,
May 14, 2016, 3:27:43 PM5/14/16
to js-code-prettifier, chira...@gmail.com, mikes...@gmail.com
Hello Mike,

To be more precise, I would love to see syntax highlighting support for Razor Views of both the cshtml and vbhtml flavors. Even better if Identifier awareness could be achieved, even if it's not perfect. Having to choose between either HTML highlighting or CS/VB highlighting is a disappointment and it would be great to have the marriage of the two. ;)

I expect the System.Web.Razor.Parser Namespace may be helpful for achieving this. :D

Cheers,
Matthew
Reply all
Reply to author
Forward
0 new messages