From d7f4200ec34f2aaa779113e408a63d5553727af7 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Wed, 12 Jan 2022 13:33:10 +0100 Subject: [PATCH] Allow dashes in host name in ports view Fixes microsoft/vscode-remote-release#6148 --- .../workbench/services/remote/common/remoteExplorerService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/services/remote/common/remoteExplorerService.ts b/src/vs/workbench/services/remote/common/remoteExplorerService.ts index 77fdb463704..faef35f1fd9 100644 --- a/src/vs/workbench/services/remote/common/remoteExplorerService.ts +++ b/src/vs/workbench/services/remote/common/remoteExplorerService.ts @@ -120,7 +120,7 @@ export function makeAddress(host: string, port: number): string { } export function parseAddress(address: string): { host: string, port: number } | undefined { - const matches = address.match(/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\:|localhost:|[a-zA-Z]+:)?([0-9]+)$/); + const matches = address.match(/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\:|localhost:|[a-zA-Z\-]+:)?([0-9]+)$/); if (!matches) { return undefined; }