mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-15 13:18:40 -09:00
Merge pull request #487 from 7373Lacym/add-localhost-regex
changed regex for most forms of localhost
This commit is contained in:
commit
23320bc72f
1 changed files with 1 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
import * as regex from './url-regex';
|
import * as regex from './url-regex';
|
||||||
|
|
||||||
export const domainRegex = /\b((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}\b/;
|
export const domainRegex = /\b((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}\b|^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*:)*?:?0*1$/;
|
||||||
|
|
||||||
export default function isUrlCommand (shell, data) {
|
export default function isUrlCommand (shell, data) {
|
||||||
const matcher = regex[shell];
|
const matcher = regex[shell];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue