File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -101,10 +101,7 @@ module.exports = function (opts) {
101101 '|' +
102102 '(?:' + re . src_pseudo_letter + ')' +
103103 '|' +
104- // don't allow `--` in domain names, because:
105- // - that can conflict with markdown — / –
106- // - nobody use those anyway
107- '(?:' + re . src_pseudo_letter + '(?:-(?!-)|' + re . src_pseudo_letter + '){0,61}' + re . src_pseudo_letter + ')' +
104+ '(?:' + re . src_pseudo_letter + '(?:-|' + re . src_pseudo_letter + '){0,61}' + re . src_pseudo_letter + ')' +
108105 ')' ;
109106
110107 re . src_host =
Original file line number Diff line number Diff line change @@ -302,3 +302,15 @@ test@google.com
302302
303303|http://google.com|bar
304304http://google.com
305+
306+ %
307+ % Domains with multiple dashes
308+ %
309+
310+ https://5b0ee223b312746c1659db3f--thelounge-chat.netlify.com/docs/
311+
312+ www.a--b.com
313+
314+ www.c--u.com
315+
316+ http://a---b.com/
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ hppt://example.com
99example.coma
1010-example.coma
1111foo.123
12- http://a.b--c.de/ % `--` disabled, because collision possible
1312localhost % only with protocol allowed
1413localhost/
1514///localhost % 3 '/' not allowed
@@ -50,4 +49,4 @@ a1.2.3.4
5049% Not email
5150%
5251foo@bar % Should be at second level domain & with correct tld
53- mailto:bar
52+ mailto:bar
You can’t perform that action at this time.
0 commit comments