Comments (23)
Yeah, I agree that might be a problem. At the moment usernames aren't configured to include a dot. I'll consider for the next version. I'll be possible to override the default regex for a username/hashtag/link.
Would that work for you?
from activelabel.swift.
Yup, that is something that would work. Looking forward to the next iteration!
from activelabel.swift.
Not happening anymore
from activelabel.swift.
No problem. Out of curiosity, what is the reasoning?
from activelabel.swift.
@ajfigueroa This issue is no longer happening, usernames with periods are now highlighted, so that's why I am closing it
from activelabel.swift.
@poolqf Awesome, thanks :)
from activelabel.swift.
Hello! It seems this is happening again.
Any idea how to fix it?
Thank you!
from activelabel.swift.
Reopening it. Thanks for the heads up @2mittens
from activelabel.swift.
After digging a bit in the sources, I noted that the Cocoapods regex is different from the GitHub one, maybe is outdated?
The problem however is present in both version, but I was able to solve it just adding . to the Cocopods one, having the whole regex like this:
(?:^|\\s|$|[.])@[a-z0-9_.]*
Does this help?
from activelabel.swift.
Hm, strange the thing about the different regex, I'll take a look into it.
Yep, the regex needs to allow the .
as a valid username character
from activelabel.swift.
Before any edits they're like this:
GitHub:
(?:^|\\s|$|[.])@[\\p{L}0-9_]*
Cocoapods
(?:^|\\s|$|[.])@[a-z0-9_]*
Adding a .
to Cocoapds regex resolve the issue, but it doesn't on the repo one.
Hope I was helpful and thank you!
from activelabel.swift.
(?:^|\\s|$|[.])@[\\p{L}0-9_.]*
This regex is working for me
from activelabel.swift.
Also with mentions with a dot in it? Because for me is working for @UserHandle, but not for @userhandle.dotted!
from activelabel.swift.
https://regex101.com/r/kJ1pY6/1
from activelabel.swift.
My bad, I wasn't building properly the framework before testing the demo. So yes, just adding the point to the regex solves the matter.
Thanks for the help!
from activelabel.swift.
this issue is still happening, any workaround?
from activelabel.swift.
There was a fix I reverted because of side effects...
from activelabel.swift.
We have this issue too. Is there a way to customize the Regex without cloning the project?
from activelabel.swift.
@polqf we have the same issue, should we fix it on our fork?, or wait for your solution?, i'm asking because you reverted a fix due to side effects.
from activelabel.swift.
Are there any news on this?
from activelabel.swift.
same as #228, added some options of regex to fix it, will try to have a PR soon
from activelabel.swift.
i have a fix working, will make the changes in the swift 4 version and create the PR next week
from activelabel.swift.
Hi, Word does not fully highlighted when contain any special letter like (&, +, -). I am using below regex pattern -
static let mentionPattern = "(?:^|\s|$|[.])@[\p{L}0-9_]*"
Please help me.
from activelabel.swift.
Related Issues (20)
- How to active email ? HOT 1
- If there are the same mention, can I know which one is clicked HOT 2
- How to calculate the height of swiftui HOT 1
- Active table #tag not working for Tamil language properly HOT 1
- HTML tags not working properly HOT 1
- customeType does not work
- Email Support has not been included in the PODS
- string have mention username without space it is not working HOT 1
- configureLinkAttribute 点击后无效
- Add padding to LabelView in swiftui does not work. HOT 1
- Nn
- Tap Label outside of tags and mentions
- Label insets Issue
- How do I use a filterHashtag in swift5
- URL Link selected font
- In mention username with dot is not detecting HOT 2
- handleCustomTap not working
- In mentions(@) full user name not detected only first name is detecting HOT 2
- urls didn't get recognised by ActiveLabel
- Apple's update to their API policy - Required Reason in Privacy manifest
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from activelabel.swift.