Skip to content

improve regex for links to be more accurate #7

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

improve regex for links to be more accurate #7

wants to merge 1 commit into from

Conversation

nallown
Copy link
Contributor

@nallown nallown commented Feb 24, 2018

This resolves #3 and also improves the regular expression to match a few more links.

@codecov
Copy link

codecov bot commented Feb 24, 2018

Codecov Report

Merging #7 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #7   +/-   ##
=======================================
  Coverage   97.33%   97.33%           
=======================================
  Files           1        1           
  Lines          75       75           
  Branches       24       24           
=======================================
  Hits           73       73           
  Misses          2        2
Impacted Files Coverage Δ
src/index.js 97.33% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3400fe8...1ef4056. Read the comment docs.

@egoist
Copy link
Owner

egoist commented Feb 24, 2018

Maybe we can switch to https://github.com/kevva/url-regex since it's really hard to maintain regexp 😂

@nallown
Copy link
Contributor Author

nallown commented Feb 24, 2018

Regex are hard to maintain but this one should be fine.

If you want a simple one that doesn't fail then we can match for www. and http(s):// for URLs and <word> @ <word> . <word> for emails. I've tested that one with my site for quite a while now and it hasn't failed.

@nallown
Copy link
Contributor Author

nallown commented Mar 17, 2018

@egoist why haven't you accepted the pull request?

@nallown
Copy link
Contributor Author

nallown commented Mar 28, 2018

@egoist If you don't want to use a regex, then you should still accept my pull request because without it, the people and I are still going to have that problem in #3 so you need to accept my pull request. Without it my users are still going to have that problem.

@nallown
Copy link
Contributor Author

nallown commented Apr 10, 2018

You can decline and close this pull request if you want I already switched to a local copy of this module that has the problem solved.

@kbonnin
Copy link
Contributor

kbonnin commented Jun 27, 2018

@egoist could this be merged in the meantime ? I'm actually having the same problem as in #3

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.

Tree dot take as url
3 participants