From 6f05263980031e20a7d5a36761f9545d6162f3f3 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 26 Jun 2022 17:18:38 +0200 Subject: [PATCH] ensure that SimpleEndCode doesn't end formatting codes with shorter names --- MLEM/Formatting/Codes/SimpleEndCode.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MLEM/Formatting/Codes/SimpleEndCode.cs b/MLEM/Formatting/Codes/SimpleEndCode.cs index 0c3aa38..f33cc3c 100644 --- a/MLEM/Formatting/Codes/SimpleEndCode.cs +++ b/MLEM/Formatting/Codes/SimpleEndCode.cs @@ -8,7 +8,7 @@ namespace MLEM.Formatting.Codes { /// public SimpleEndCode(Match match, Regex regex, string codeNameToEnd) : base(match, regex) { - this.codeToEnd = new Regex($"<{codeNameToEnd}.*>"); + this.codeToEnd = new Regex($@"<{codeNameToEnd}(\W.*)?>"); } ///