From 5901cee9b9b7df3ad07e3cf895bf74fb65b276cc Mon Sep 17 00:00:00 2001 From: Johan Liesén Date: Thu, 6 Sep 2012 10:33:33 +0200 Subject: Align regex comments on the same line as the expression --- lib/utils.coffee | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/utils.coffee b/lib/utils.coffee index 597e5f6c..c5bfcc26 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -47,12 +47,9 @@ Utils = isUrl: (str) -> # More or less RFC compliant URL host part parsing. This should be sufficient for our needs urlRegex = new RegExp( - # user:password (optional) => \1, \2 - '^(?:([^:]+)(?::([^:]+))?@)?' + - # host name (IPv6 addresses in square brackets allowed) => \3 - '([^:]+|\\[[^\\]]+\\])' + - # port number (optional) => \4 - '(?::(\\d+))?$' + '^(?:([^:]+)(?::([^:]+))?@)?' + # user:password (optional) => \1, \2 + '([^:]+|\\[[^\\]]+\\])' + # host name (IPv6 addresses in square brackets allowed) => \3 + '(?::(\\d+))?$' # port number (optional) => \4 ) # Official ASCII TLDs that are longer than 3 characters -- cgit v1.2.3