Skip to content

Commit 2347122

Browse files
author
setchi
committed
Rename variables
1 parent cae151f commit 2347122

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Assets/Hypertext/Examples/RegexExample.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ public class RegexExample : MonoBehaviour
55
[SerializeField]
66
RegexHypertext _text;
77

8-
const string _urlPattern = "http(s)?://([\\w-]+\\.)+[\\w-]+(/[\\w- ./?%&=]*)?";
9-
const string _hashtagPattern = "[##][A-Za-zA-Za-z一-鿆0-90-9ぁ-ヶヲ-゚ー]+";
8+
const string RegexURL = "http(s)?://([\\w-]+\\.)+[\\w-]+(/[\\w- ./?%&=]*)?";
9+
const string RegexHashtag = "[##][A-Za-zA-Za-z一-鿆0-90-9ぁ-ヶヲ-゚ー]+";
1010

1111
void Start()
1212
{
13-
_text.SetClickableByRegex(_urlPattern, Color.cyan, url => Debug.Log(url));
14-
_text.SetClickableByRegex(_hashtagPattern, Color.green, hashtag => Debug.Log(hashtag));
13+
_text.SetClickableByRegex(RegexURL, Color.cyan, url => Debug.Log(url));
14+
_text.SetClickableByRegex(RegexHashtag, Color.green, hashtag => Debug.Log(hashtag));
1515
}
1616
}

0 commit comments

Comments
 (0)