toddams / RazorLight

Template engine based on Microsoft's Razor parsing engine for .NET Core
Apache License 2.0
1.52k stars 259 forks source link

Conditional Attributes are not supported #265

Closed lars-nielsen closed 5 years ago

lars-nielsen commented 5 years ago

Describe the bug

The following template will fail, this is due to Razor having a dependency on Mvc See https://github.com/aspnet/AspNetCore/issues/5076

<span attr="@if (true) {}"></span>

To Reproduce Create a template with the above content

Expected behavior A correctly rendered template / no exception

Information (please complete the following information): Irrelevant