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

Replace Linkifier RegExp to RFC3986 based one #611

Closed
wants to merge 2 commits into from

Conversation

tmyt
Copy link
Contributor

@tmyt tmyt commented Mar 17, 2017

Current Linkifier has some problems.
The PR replace Linkifier RegExp to RFC3986 based one, and aim to resolve issues #599 and #601.

These URLs are now Linkify.

Could you discuss "should" or "should not" linkify the URI without "//"?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 68.038% when pulling b2a4e9e on tmyt:propose/rfc3986 into 6d25706 on sourcelair:master.

Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat 😃

Did you write this up yourself or did you borrow it from somewhere as we might need to include the license.

Also does this have unicode support or is that still unresolved?

@Tyriar Tyriar self-assigned this Mar 17, 2017
@tmyt
Copy link
Contributor Author

tmyt commented Mar 17, 2017

The code wrote myself with refer the Appendix A of IETF RFC 3986 documentation.

Strictly, Unicode characters is not allowed in URI and should be encode with Percent or Punycode. Then this implementation does not support Unicode chars.

@Tyriar
Copy link
Member

Tyriar commented Mar 17, 2017

@tmyt strictly, same with brackets which get encoded. Browsers and such will try to help the user out by allowing unencoding characters in URLs, there are also legal unicode domain names now. I wonder if doing this is even worth it as the real fix imo is to implement a proper parser to get the ideal behavior as in #583

@tmyt
Copy link
Contributor Author

tmyt commented Mar 17, 2017

@Tyriar Ah, I did not check #583 that implement in mean time, the PR is not needed. If not needed, please reject this.

@Tyriar
Copy link
Member

Tyriar commented Mar 17, 2017

@tmyt while this would be an improvement, it's probably a good idea to not switch to this and then a parser. Thanks for understanding 😃 something like this is what I'm thinking for the parser https://github.com/Microsoft/vscode/blob/master/src/vs/editor/common/modes/linkComputer.ts

@Tyriar Tyriar closed this Mar 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants