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

Fix paths containing unencoded ` followed by punctuation #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/re.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module.exports = function (opts) {
'\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\}|' +
'\\"(?:(?!' + re.src_ZCc + '|["]).)+\\"|' +
"\\'(?:(?!" + re.src_ZCc + "|[']).)+\\'|" +
"\\'(?=" + re.src_pseudo_letter + '|[-])|' + // allow `I'm_king` if no pair found
"\\'(?=" + re.src_pseudo_letter + '|[-|' + re.src_ZPCc + '])|' + // allow `I'm_king` if no pair found
'\\.{2,}[a-zA-Z0-9%/&]|' + // google has many dots in "google search" links (#66, #81).
// github has ... in commit range links,
// Restrict to
Expand Down
4 changes: 4 additions & 0 deletions test/fixtures/links.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ http://foo.com/blah_blah_"doublequoted"

http://foo.com/blah_blah_'singlequoted'

https://domain.com/@username:4/some-words'&=0

https://domain.com/@username:4/some-words':0

(Scoped like http://example.com/foo_bar)
http://example.com/foo_bar

Expand Down