Skip to content

Commit

Permalink
Support URLs with file extensions (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
nautilebleu authored and lukechilds committed Apr 11, 2019
1 parent 2cd1917 commit b215778
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/regex.js
Expand Up @@ -3,7 +3,7 @@ import tlds from 'tlds';
// Reusables
const validTlds = tlds.concat(['local', 'dev']).join('|');
const escapeChar = `\\`;
const notWhitespaceCommaDoubleQuoteOrDot = `[^${escapeChar}s,".]`;
const notWhitespaceCommaDoubleQuoteOrDot = `[^${escapeChar}s,"]`;
const dot = `${escapeChar}.`;
const hostnameChars = `[a-z0-9]`;
const number = `[0-9]`;
Expand Down
4 changes: 4 additions & 0 deletions test/fixtures/matches.json
Expand Up @@ -138,5 +138,9 @@
{
"description": "Url with url encoded string",
"url": "url.com/Test+url+encoding+with+symbols+!%40£%24%25^%26*()_%2B"
},
{
"description": "Url with extension",
"url": "url.com/foo.bar"
}
]

0 comments on commit b215778

Please sign in to comment.