Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only one trailing parenthesis linkified #209

Open
filippog opened this issue Aug 7, 2017 · 1 comment
Open

Only one trailing parenthesis linkified #209

filippog opened this issue Aug 7, 2017 · 1 comment

Comments

@filippog
Copy link

filippog commented Aug 7, 2017

Hi!
I tried linkifying an url like this at the demo page: https://foo.bar/?a=b((((aaaa)))) and the resulting link included only the first ) but not the remaining ones.

@nfrasser
Copy link
Collaborator

nfrasser commented Mar 3, 2018

This is an unfortunate limitation of Linkify's parser. It must account for links wrapped in parens (e.g., Visit GitHub (https://github.com) as well as those with parens in the query like the one you provided.

It's difficult (though not impossible) to fix. It would require totally rewriting the parser code. So I wouldn't expect a fix out any time soon

The parser code is here, for anyone that wants to take a stab at this: https://github.com/SoapBox/linkifyjs/blob/master/src/linkify/core/parser.js

It's a very basic, memory-less state machine. Giving it some memory should do the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants