mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[Style] Fix finding end-of-line comments
This commit is contained in:
@@ -407,7 +407,7 @@ namespace SabreTools.Helper.Tools
|
|||||||
// Preprocess the string
|
// Preprocess the string
|
||||||
s = s.Trim();
|
s = s.Trim();
|
||||||
s = Regex.Replace(s, @"^\S* \(", ""); // Remove item identifier and opening brace
|
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.TrimEnd(')'); // Remove closing brace
|
||||||
s = s.Trim(); // Remove leading and trailing whitespace
|
s = s.Trim(); // Remove leading and trailing whitespace
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user