<commit_before>﻿@model JoinRpg.DataModel.MarkdownString
@{
  var requiredMsg = new MvcHtmlString("");
    var validation = false;
  foreach (var attr in @Html.GetUnobtrusiveValidationAttributes(@ViewData.TemplateInfo.HtmlFieldPrefix, @ViewData.ModelMetadata))
  {
      if (attr.Key == "data-val-required")
      {
          requiredMsg = new MvcHtmlString("data-val-required='" + HttpUtility.HtmlAttributeEncode((string) attr.Value) + "'");
          validation = true;
      }
  }
}
<div>
    Можно использовать <a href="http://daringfireball.net/projects/markdown/syntax">MarkDown</a> (**<b>полужирный</b>**, _<i>курсив</i>_) <br/>
    <textarea cols="100" id="@(ViewData.TemplateInfo.HtmlFieldPrefix)_Contents" name="@(ViewData.TemplateInfo.HtmlFieldPrefix).Contents" @requiredMsg @(validation ? "data-val=true" : "") rows="4">@(Model == null ? "" : Model.Contents)</textarea>
</div>
@if (validation)
{
@Html.ValidationMessageFor(model => Model.Contents, "", new { @class = "text-danger" })
}<commit_msg>Polish Editor.MarkdownString<commit_after>﻿@model JoinRpg.DataModel.MarkdownString
@{
  var requiredMsg = new MvcHtmlString("");
    var validation = false;
  foreach (var attr in @Html.GetUnobtrusiveValidationAttributes(@ViewData.TemplateInfo.HtmlFieldPrefix, @ViewData.ModelMetadata))
  {
      if (attr.Key == "data-val-required")
      {
          requiredMsg = new MvcHtmlString("data-val-required='" + HttpUtility.HtmlAttributeEncode((string) attr.Value) + "'");
          validation = true;
      }
  }
}
<div>
    Можно использовать <a href="http://daringfireball.net/projects/markdown/syntax">MarkDown</a> (**<b>полужирный</b>**, _<i>курсив</i>_) <br/>
    <textarea
        cols="100"
        id="@(ViewData.TemplateInfo.HtmlFieldPrefix)_Contents"
        name="@(ViewData.TemplateInfo.HtmlFieldPrefix).Contents"
        @requiredMsg @(validation ? "data-val=true" : "") 
        rows="4">
            @(Model == null ? "" : Model.Contents)
    </textarea>
</div>
@if (validation)
{
@Html.ValidationMessageFor(model => Model.Contents, "", new { @class = "text-danger" })
}
{'fraction_non_alphanumeric': 0.17177033492822966, 'fraction_numerical': 0.003827751196172249, 'mean_word_length': 4.175742574257426, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '825194', 'n_tokens_mistral': 685, 'n_tokens_neox': 671, 'n_words': 105}