Skip to content

Commit a0b1cc5

Browse files
committed
Support apostrophes followed by punctuation
1 parent 9482bfe commit a0b1cc5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/re.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module.exports = function (opts) {
5757
'\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\}|' +
5858
'\\"(?:(?!' + re.src_ZCc + '|["]).)+\\"|' +
5959
"\\'(?:(?!" + re.src_ZCc + "|[']).)+\\'|" +
60-
"\\'(?=" + re.src_pseudo_letter + '|[-])|' + // allow `I'm_king` if no pair found
60+
"\\'(?=" + re.src_pseudo_letter + '|[-|' + re.src_ZPCc + '])|' + // allow `I'm_king` if no pair found
6161
'\\.{2,}[a-zA-Z0-9%/&]|' + // google has many dots in "google search" links (#66, #81).
6262
// github has ... in commit range links,
6363
// Restrict to

test/fixtures/links.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ http://foo.com/blah_blah_"doublequoted"
135135

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

138+
https://domain.com/@username:4/some-words'&=0
139+
140+
https://domain.com/@username:4/some-words':0
141+
138142
(Scoped like http://example.com/foo_bar)
139143
http://example.com/foo_bar
140144

0 commit comments

Comments
 (0)