diff --git a/TallyCore/Votes/PostComponents.cs b/TallyCore/Votes/PostComponents.cs index 373eb28e..fdb33b25 100644 --- a/TallyCore/Votes/PostComponents.cs +++ b/TallyCore/Votes/PostComponents.cs @@ -24,7 +24,7 @@ public class PostComponents : IComparable, IComparer // A post with ##### at the start of one of the lines is a posting of tally results. Don't read it. readonly Regex tallyRegex = new Regex(@"^#####", RegexOptions.Multiline); // A valid vote line must start with [x] or -[x] (with any number of dashes). It must be at the start of the line. - readonly Regex voteLineRegex = new Regex(@"^(\s|\[/?[ibu]\]|\[color[^]]+\])*-*\s*\[\s*[xX+✓✔1-9]\s*\]"); + readonly Regex voteLineRegex = new Regex(@"^-*\s*\[\s*[xX+✓✔1-9]\s*\]"); // Nomination-style votes. @username, one per line. readonly Regex nominationLineRegex = new Regex(@"^\[url=""[^""]+?/members/\d+/""](?@[^[]+)\[/url\]\s*$"); @@ -50,7 +50,7 @@ public PostComponents(string author, string id, string text) return; var lines = Utility.Text.GetStringLines(text); - var voteLines = lines.Where(a => voteLineRegex.Match(a).Success); + var voteLines = lines.Where(a => voteLineRegex.Match(VoteString.CleanVote(a)).Success); if (voteLines.Any()) {