Skip to content

Commit

Permalink
Support apostrophes followed by punctuation
Browse files Browse the repository at this point in the history
  • Loading branch information
timjamello committed Apr 1, 2023
1 parent 9482bfe commit a0b1cc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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

0 comments on commit a0b1cc5

Please sign in to comment.