<commit_before>﻿@using System.Text.RegularExpressions
@using Joinrpg.Markdown
@using JoinRpg.Web.Helpers
@using JoinRpg.Web.Models
@model TargetedSearchResultViewModel

<style type="text/css">
    <!--
    .searchResultDetails {
        margin-left: 20px;
    }
    -->
</style>

<div>
    <h4>
        @{
            var gameObjectLinkViewModel = Model.SearchResult.AsObjectLink();
        }
        @Html.DisplayFor(model => gameObjectLinkViewModel)
    </h4>
    <p class="searchResultDetails" >
        @{
          string descriptionToShow = (Model.SearchResult.Description.ToPlainText() ?? "");

          const int maxLengthToShow = 200;
          descriptionToShow = StringFormatHelper.TruncateString(descriptionToShow, Model.SearchTarget, maxLengthToShow);

          descriptionToShow = Regex.Replace(
            descriptionToShow,
            Model.SearchTarget,
            "<b><u>" + Model.SearchTarget + "</u></b>", RegexOptions.IgnoreCase);

        }
        @Html.Raw(descriptionToShow)
    </p>
</div><commit_msg>ISearchResult: make indentaion relative. Add bottom margin to split results from each other.<commit_after>﻿@using System.Text.RegularExpressions
@using Joinrpg.Markdown
@using JoinRpg.Web.Helpers
@using JoinRpg.Web.Models
@model TargetedSearchResultViewModel

<style type="text/css">
    <!--
    .searchResultDetails {
        margin-left: 2em;
        margin-bottom: 1.5em;
    }
    -->
</style>

<div>
    <h4>
        @{
          var gameObjectLinkViewModel = Model.SearchResult.AsObjectLink();
        }
        @Html.DisplayFor(model => gameObjectLinkViewModel)
    </h4>
    <p class="searchResultDetails">
        @{
          string descriptionToShow = Model.SearchResult.Description.ToPlainText();

          const int maxLengthToShow = 200;
          descriptionToShow = StringFormatHelper.TruncateString(descriptionToShow, Model.SearchTarget, maxLengthToShow);

          descriptionToShow = Regex.Replace(
              descriptionToShow,
              Model.SearchTarget,
              "<b><u>" + Model.SearchTarget + "</u></b>", RegexOptions.IgnoreCase);
        }
        @Html.Raw(descriptionToShow)
    </p>
</div>
{'fraction_non_alphanumeric': 0.11865189289012004, 'fraction_numerical': 0.006925207756232687, 'mean_word_length': 2.6916524701873934, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 31, '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': '1084779', 'n_tokens_mistral': 646, 'n_tokens_neox': 623, 'n_words': 109}