So I have been looking through relevant questions and I can't figure out exactly why my script tag is malformed.
<script language="javascript" type="text/javascript">
var showME = false;
var showSuffix = "";
@if (ViewData["showME"] != null && ViewData["showSuffix"] != null)
{
<text>
showME = @(Convert.ToBoolean(ViewData["showME"]) ? "true" : "false");
showSuffix = '@Html.Raw(Json.Encode(ViewData["showSuffix "]))';
</text>
}
</script>
EDIT! The answer below is correct but I tracked down the malformed part to this line.
var videoHelpUrl = @(Url.Action("Index", "Help", new { Id = 46 }));