mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-09-30 07:21:54 +00:00
Use unicode word chars to recognize hashtags in editor (#1296)
This commit is contained in:
parent
776a51734f
commit
f68e174aac
1 changed files with 1 additions and 1 deletions
|
@ -300,7 +300,7 @@ public class StatusEditorViewModel: NSObject, ObservableObject {
|
||||||
.backgroundColor: UIColor.clear,
|
.backgroundColor: UIColor.clear,
|
||||||
.underlineColor: UIColor.clear],
|
.underlineColor: UIColor.clear],
|
||||||
range: NSMakeRange(0, statusText.string.utf16.count))
|
range: NSMakeRange(0, statusText.string.utf16.count))
|
||||||
let hashtagPattern = "(#+[a-zA-Z0-9(_)]{1,})"
|
let hashtagPattern = "(#+[\\w0-9(_)]{1,})"
|
||||||
let mentionPattern = "(@+[a-zA-Z0-9(_).-]{1,})"
|
let mentionPattern = "(@+[a-zA-Z0-9(_).-]{1,})"
|
||||||
let urlPattern = "(?i)https?://(?:www\\.)?\\S+(?:/|\\b)"
|
let urlPattern = "(?i)https?://(?:www\\.)?\\S+(?:/|\\b)"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue