mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
Fix port log line and add regex check
This commit is contained in:
@@ -247,7 +247,12 @@ export class PortsAttributes extends Disposable {
|
||||
const match = (<string>attributesKey).match(PortsAttributes.RANGE);
|
||||
key = { start: Number(match![1]), end: Number(match![2]) };
|
||||
} else {
|
||||
const regTest: RegExp = RegExp(attributesKey);
|
||||
let regTest: RegExp | undefined = undefined;
|
||||
try {
|
||||
regTest = RegExp(attributesKey);
|
||||
} catch (e) {
|
||||
// The user entered an invalid regular expression.
|
||||
}
|
||||
if (regTest) {
|
||||
key = regTest;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user