Skip to content

Commit

Permalink
Add support for username in URL (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Pinto committed Dec 4, 2018
1 parent 39f17cf commit f9156de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,14 @@ test('skips URLs preceded by a `+` sign', t => {
t.is(m(fixture), fixture);
});

test.failing('supports username in url', t => {
test('supports username in url', t => {
t.is(m('https://user@sindresorhus.com/@foo'), '<a href="https://user@sindresorhus.com/@foo">https://user@sindresorhus.com/@foo</a>');
});

test('supports a URL with a subdomain', t => {
t.is(m('http://docs.google.com'), '<a href="http://docs.google.com">http://docs.google.com</a>');
});

test('skips email addresses', t => {
t.is(m('sindre@example.com'), 'sindre@example.com');
t.is(m('www.sindre@example.com'), 'www.sindre@example.com');
Expand Down

0 comments on commit f9156de

Please sign in to comment.