This question is an epilogue of the great question Mix Razor and Javascript code where I learn about this syntax:
@if (foo)
{
// C# code
<text>
// JS Code
</text>
}
It worked well, until today, when I used a JS regex inside the <text></text>
:
$('#bar').html(boo.replace(/<br([\/ ]*)>/g, "\r\n"));
Which throw a yellow page telling me that there was an issue with br(
which can't be analyzed.
Is there an inline way to deal with it?
/` – Mike Cluck Oct 21 '16 at 14:24