Skip to content

Commit 54247ad

Browse files
committed
Support unencoded apostrophes in certain cases
1 parent 9482bfe commit 54247ad

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

lib/re.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ module.exports = function (opts) {
6666
// - parts of file path
6767
// - params separator
6868
// until more examples found.
69+
"\\'[\:a-zA-Z0-9%/&]|" + // Odysee uses `'` as a separator
70+
// Restrict to
71+
// - english
72+
// - percent-encoded
73+
// - parts of file path
74+
// - params separator
75+
// until more examples found.
6976
'\\.(?!' + re.src_ZCc + '|[.]|$)|' +
7077
(opts['---'] ?
7178
'\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate

test/fixtures/links.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,4 +332,4 @@ www.a--b.com
332332

333333
www.c--u.com
334334

335-
http://a---b.com/
335+
https://odysee.com/@EatMoreVegans:4/can-chefstemp-knock-thermoworks':0

0 commit comments

Comments
 (0)