]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Fix localhost links
authorDaniel Imms <daimms@microsoft.com>
Thu, 23 Feb 2017 17:37:35 +0000 (09:37 -0800)
committerDaniel Imms <daimms@microsoft.com>
Thu, 23 Feb 2017 17:37:35 +0000 (09:37 -0800)
src/Linkifier.ts

index e0f5eb926f5d81bd450fa640787e39a4aa77572f..7a813733b2655643d8f09aa6128b8f90f135bb3d 100644 (file)
@@ -12,8 +12,9 @@ const negatedDomainCharacterSet = '[^\\da-z\\.-]+';
 const domainBodyClause = '(' + domainCharacterSet + ')';
 const tldClause = '([a-z\\.]{2,6})';
 const ipClause = '((\\d{1,3}\\.){3}\\d{1,3})';
+const localHostClause = '(localhost)';
 const portClause = '(:\\d{1,5})';
-const hostClause = '((' + domainBodyClause + '\\.' + tldClause + ')|' + ipClause + ')' + portClause + '?';
+const hostClause = '((' + domainBodyClause + '\\.' + tldClause + ')|' + ipClause + '|' + localHostClause + ')' + portClause + '?';
 const pathClause = '(\\/[\\/\\w\\.-]*)*';
 const queryStringClause = '(\\?[\\w\\[\\]\\(\\)\\/\\?\\!#@$&\'*+,:;]*)?';
 const negatedPathCharacterSet = '[^\\/\\w\\.-]+';