Skip to content
This repository was archived by the owner on Dec 23, 2023. It is now read-only.

Commit 5dfec2b

Browse files
Tags should be trimmed before use.
1 parent b28e0ca commit 5dfec2b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Structurizr.Core/Model/ModelItem.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ public void AddTags(params string[] tags)
7878
{
7979
if (tag != null)
8080
{
81-
if (!_tags.Contains(tag))
81+
string t = tag.Trim();
82+
if (!_tags.Contains(t))
8283
{
83-
_tags.Add(tag);
84+
_tags.Add(t);
8485
}
8586
}
8687
}
@@ -90,7 +91,7 @@ public virtual void RemoveTag(string tag)
9091
{
9192
if (tag != null)
9293
{
93-
this._tags.Remove(tag);
94+
this._tags.Remove(tag.Trim());
9495
}
9596
}
9697

0 commit comments

Comments
 (0)