Improvement: @"..."@ or @'...'@ as alias for <text>...</text>


In order to to use razor to generate "non-XML-like languages" without using <text> tags
as a softwaredevelopper
i want @"..."@ or @'...'@ as alias for <text>...</text>
From http://stackoverflow.com/questions/4938134/use-razor-to-generate-code
> You certainly could use Razor to generate C# code, 
> but it's not really designed for non-XML-like languages. 
> You'd have to have a lot of <text> tags.
I implemented a small working example http://stackoverflow.com/questions/4938134/use-razor-to-generate-code/5376539#5376539
and thought that @"..."@ or @'...'@ as alias for <text>...</text> would make the code much more clear


BuildStarted wrote Mar 21, 2011 at 3:18 PM

I'll have to look into the parser and see if there is a mechanism for that. Also, consider that the parser is actually a separate project at http://aspnet.codeplex.com so even if it were possible - code changes to future versions might break it. Currently the parser only looks for the xml tag of "text" and as such changing it to something else doesn't work straight off the bat. (Especially considering that @ is supposed to be a transition to code.

I'm not saying it's not going to work but I don't think the parser works in the way you intend it to. :)

With that said, I will look into it.

wrote Apr 24, 2011 at 8:16 AM

wrote Apr 11, 2012 at 3:14 PM

wrote Jun 13, 2012 at 7:48 PM

wrote Aug 10, 2012 at 12:31 AM

wrote Feb 22, 2013 at 12:17 AM

wrote Aug 31, 2014 at 12:23 PM