Remove extra line breaks and white space

Jan 14, 2015 at 4:37 PM
Default razor engine does not remove the extra line breaks and white spaces. Looks like Razor generator does not either. Is there an option to do so?

For example if my cshtml is:
                 <div id="vmName" class="labelContent rdonly">
the generated cs will be:
            #line hidden
WriteLiteral("</div>\r\n                 <div id=\"vmName\" class=\"labelContent rdonly\">\r\n         " +
"            <div>");
Note the "\r\n" are totally junk and does nothing to browsers and yet waste bandwidth to send.
Jan 14, 2015 at 6:17 PM
RG just uses the normal engine under the cover, so the behavior will match. In other word, this is more of a general Razor question than a RG question, so it would be better discussed on the general ASP.NET/Razor forum.