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

CSHTML Minifier Produces Invalid Code When Model For Razor Template Is a List<T> #1

Open
drew-forsberg opened this issue Feb 20, 2018 · 0 comments

Comments

@drew-forsberg
Copy link

The CSHTML minifier has an issue when the model for a Razor template is a List and no other .NET code exists between the model declaration and the first HTML tag. The angle brackets seemingly get mistaken for HTML. The minifier removes all white space and line breaks in between the model declaration and the HTML tag, producing invalid Razor markup that won't compile.

I was able to work around it for now by adding a .NET code block w/ comments after the model declaration (see attached screenshots). Could you please look into a permanent fix for the issue? Thanks!

cshtml-minifier issue

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

No branches or pull requests

1 participant