Hide numerical prefix for about page rules if included in the config
This commit is contained in:
parent
425ec2621d
commit
4023ca37d4
@ -1,4 +1,5 @@
|
||||
@using SharedLibraryCore.Configuration
|
||||
@using System.Text.RegularExpressions
|
||||
@model WebfrontCore.ViewModels.CommunityInfo
|
||||
@{
|
||||
IEnumerable<KeyValuePair<(string, long), string[]>> allRules = new[] {new KeyValuePair<(string, long), string[]>((ViewBag.Localization["WEBFRONT_ABOUT_GLOBAL_RULES"], 0), Model.GlobalRules)};
|
||||
@ -71,7 +72,10 @@
|
||||
@foreach (var rule in rules)
|
||||
{
|
||||
<div class="text-white-50">
|
||||
@if (!rule.StartsWith("#") && !Regex.IsMatch(rule, @"^\d+(.|\))"))
|
||||
{
|
||||
<span class="text-white">@start.</span>
|
||||
}
|
||||
<color-code value="@rule"></color-code>
|
||||
</div>
|
||||
start++;
|
||||
|
Loading…
Reference in New Issue
Block a user