From 7b78e0803ae5e7e12c6cfea99126f0e2e0bb56dd Mon Sep 17 00:00:00 2001 From: RaidMax Date: Sat, 9 Apr 2022 10:16:34 -0500 Subject: [PATCH] Hide numerical prefix for about page rules if included in the config --- WebfrontCore/Views/About/Index.cshtml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/WebfrontCore/Views/About/Index.cshtml b/WebfrontCore/Views/About/Index.cshtml index bf75c46e..1031bb74 100644 --- a/WebfrontCore/Views/About/Index.cshtml +++ b/WebfrontCore/Views/About/Index.cshtml @@ -1,4 +1,5 @@ @using SharedLibraryCore.Configuration +@using System.Text.RegularExpressions @model WebfrontCore.ViewModels.CommunityInfo @{ IEnumerable> 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) {
- @start. + @if (!rule.StartsWith("#") && !Regex.IsMatch(rule, @"^\d+(.|\))")) + { + @start. + }
start++;