Git Product home page Git Product logo

Comments (23)

schickling avatar schickling commented on May 24, 2024

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.

ajfigueroa avatar ajfigueroa commented on May 24, 2024

Yup, that is something that would work. Looking forward to the next iteration!

from activelabel.swift.

polqf avatar polqf commented on May 24, 2024

Not happening anymore

from activelabel.swift.

ajfigueroa avatar ajfigueroa commented on May 24, 2024

No problem. Out of curiosity, what is the reasoning?

from activelabel.swift.

polqf avatar polqf commented on May 24, 2024

@ajfigueroa This issue is no longer happening, usernames with periods are now highlighted, so that's why I am closing it

from activelabel.swift.

ajfigueroa avatar ajfigueroa commented on May 24, 2024

@poolqf Awesome, thanks :)

from activelabel.swift.

stefan-contiero avatar stefan-contiero commented on May 24, 2024

Hello! It seems this is happening again.
screen shot 2016-05-31 at 10 46 50
Any idea how to fix it?

Thank you!

from activelabel.swift.

polqf avatar polqf commented on May 24, 2024

Reopening it. Thanks for the heads up @2mittens

from activelabel.swift.

stefan-contiero avatar stefan-contiero commented on May 24, 2024

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.

polqf avatar polqf commented on May 24, 2024

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.

stefan-contiero avatar stefan-contiero commented on May 24, 2024

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.

polqf avatar polqf commented on May 24, 2024

(?:^|\\s|$|[.])@[\\p{L}0-9_.]* This regex is working for me

from activelabel.swift.

stefan-contiero avatar stefan-contiero commented on May 24, 2024

Also with mentions with a dot in it? Because for me is working for @UserHandle, but not for @userhandle.dotted!

from activelabel.swift.

polqf avatar polqf commented on May 24, 2024

https://regex101.com/r/kJ1pY6/1

from activelabel.swift.

stefan-contiero avatar stefan-contiero commented on May 24, 2024

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.

MarvinNazari avatar MarvinNazari commented on May 24, 2024

this issue is still happening, any workaround?

from activelabel.swift.

polqf avatar polqf commented on May 24, 2024

There was a fix I reverted because of side effects...

from activelabel.swift.

blixt avatar blixt commented on May 24, 2024

We have this issue too. Is there a way to customize the Regex without cloning the project?

from activelabel.swift.

demonar avatar demonar commented on May 24, 2024

@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.

davidpflugpeil avatar davidpflugpeil commented on May 24, 2024

Are there any news on this?

from activelabel.swift.

demonar avatar demonar commented on May 24, 2024

same as #228, added some options of regex to fix it, will try to have a PR soon

from activelabel.swift.

demonar avatar demonar commented on May 24, 2024

i have a fix working, will make the changes in the swift 4 version and create the PR next week

from activelabel.swift.

 avatar commented on May 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.