kirbysayshi/vash

Support @: for opened tags

Opened this issue · 1 comments

guumo commented

It would be a good idea to support the syntax @: for open tags used in conditionals. For example, to add a link.

@if(model.url) { @:<a href="@model.url"> }

Does Razor allow this? I was under the impression that Razor forced @: to treat all content until a new line as "content" and not code.

Regardless, vash is actually failing because the <a> tag is unclosed. Use the self-closing version instead: @:<a href="@model.url" />