Skip to content

Commit

Permalink
Handle searches for labels with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed May 21, 2021
1 parent 10fd035 commit 1eb0b0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GUI/Model/ModSearch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ private string getCombined()
}
foreach (var label in Labels)
{
pieces.Add($"{Properties.Resources.ModSearchLabelPrefix}{label.Name}");
pieces.Add($"{Properties.Resources.ModSearchLabelPrefix}{label.Name.Replace(" ", "")}");
}
if (Compatible.HasValue)
{
Expand Down Expand Up @@ -306,7 +306,7 @@ public static ModSearch Parse(string combined, List<ModuleLabel> knownLabels)
}
else if (TryPrefix(s, Properties.Resources.ModSearchLabelPrefix, out string labelName))
{
labels.AddRange(knownLabels.Where(lb => lb.Name == labelName));
labels.AddRange(knownLabels.Where(lb => lb.Name.Replace(" ", "") == labelName));
}
else if (TryPrefix(s, Properties.Resources.ModSearchYesPrefix, out string yesSuffix))
{
Expand Down

0 comments on commit 1eb0b0b

Please sign in to comment.