mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
Allow dashes in host name in ports view
Fixes microsoft/vscode-remote-release#6148
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user