Skip to content

Commit f500d29

Browse files
committed
Update for Untiy2019 specification changes
1 parent b93b53d commit f500d29

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Assets/Hypertext/Examples/RegexHypertext.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ protected override void AddListeners()
6464
{
6565
foreach (var entry in entries)
6666
{
67-
foreach (Match match in Regex.Matches(text, entry.RegexPattern))
67+
#if UNITY_2019_1_OR_NEWER
68+
var _text = text.Replace(" ", "").Replace("\n", "");
69+
#else
70+
var _text = text;
71+
#endif
72+
foreach (Match match in Regex.Matches(_text, entry.RegexPattern))
6873
{
6974
OnClick(match.Index, match.Value.Length, entry.Color, entry.Callback);
7075
}

0 commit comments

Comments
 (0)