RegeributedTextView icon indicating copy to clipboard operation
RegeributedTextView copied to clipboard

@Mention not deteching a word if it is seperated by . or any any special charcter

Open Jitenderios opened this issue 7 years ago • 3 comments

Hi @rinov , I am using your library in my project. I am facing one issue with @mention. Scenario: if the @mention word contains . or any special characters, on tap of these words it only detects the prefix of that before . or special character. Example :-if the word is @jitender.kumar , on tapping this word, it is only detecting jitender and not jitender.kumar

Thanks in advance. Jitender

Jitenderios avatar Jan 02 '18 05:01 Jitenderios

Hi @rinov any update on this issue.

Thanks Jitender

Jitenderios avatar Jan 09 '18 06:01 Jitenderios

Hi @Jitenderios Thank you for your explanation, Probably special characters are detected as regular expression. Currently @mention is available only either digit or alphabets, so it needs escaping handling for other words. I'll fix this issue in the near future as a new version.

Thank you.

rinov avatar Jan 15 '18 17:01 rinov

@rinov Hi, I have fixed this issue at my end. We just need to change the regex for this. Go to the RegexStringType.swift file and replace case- case mention = "@[\p{L}0-9_〜ー]+ with case mention = "@[\p{L}0-9_〜ー.]+ This will resolve the issue. Thanks

Jitenderios avatar Oct 09 '18 07:10 Jitenderios