Skip to content

Commit 96682e0

Browse files
committed
context keys: use old parser as the default one
1 parent 4330f35 commit 96682e0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/vs/platform/contextkey/common/contextkey.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export abstract class ContextKeyExpr {
126126
return ContextKeySmallerEqualsExpr.create(key, value);
127127
}
128128

129-
public static deserialize(serialized: string | null | undefined): ContextKeyExpression | undefined {
129+
public static deserializeNew(serialized: string | null | undefined): ContextKeyExpression | undefined {
130130
if (!serialized) {
131131
return undefined;
132132
}
@@ -152,7 +152,7 @@ export abstract class ContextKeyExpr {
152152
return expr;
153153
}
154154

155-
public static deserializeOld(serialized: string | null | undefined): ContextKeyExpression | undefined {
155+
public static deserialize(serialized: string | null | undefined): ContextKeyExpression | undefined {
156156
if (!serialized) {
157157
return undefined;
158158
}
@@ -1488,7 +1488,8 @@ export class ContextKeyRegexExpr implements IContextKeyExpression {
14881488

14891489
public serialize(): string {
14901490
const value = this.regexp
1491-
? `/${this.regexp.source}/${this.regexp.flags}`
1491+
// ? `/${this.regexp.source}/${this.regexp.flags}`
1492+
? `/${this.regexp.source}/`
14921493
: '/invalid/';
14931494
return `${this.key} =~ ${value}`;
14941495
}

0 commit comments

Comments
 (0)