From 3c33276d39ae0e979d668570f9989c4f6d391c36 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 4 Nov 2016 10:23:23 -0700 Subject: [PATCH] [Style] Fix finding end-of-line comments --- SabreTools.Helper/Tools/Style.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SabreTools.Helper/Tools/Style.cs b/SabreTools.Helper/Tools/Style.cs index 836d4987..cd394408 100644 --- a/SabreTools.Helper/Tools/Style.cs +++ b/SabreTools.Helper/Tools/Style.cs @@ -407,7 +407,7 @@ namespace SabreTools.Helper.Tools // Preprocess the string s = s.Trim(); s = Regex.Replace(s, @"^\S* \(", ""); // Remove item identifier and opening brace - s = Regex.Replace(s, @"#.*$", ""); // Remove trailing comments + s = Regex.Replace(s, @"\)\S*#.*$", ""); // Remove trailing comments s = s.TrimEnd(')'); // Remove closing brace s = s.Trim(); // Remove leading and trailing whitespace