[Style] Fix finding end-of-line comments

This commit is contained in:
Matt Nadareski
2016-11-04 10:23:23 -07:00
parent 1951cfbf4a
commit 3c33276d39

View File

@@ -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