mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Avoid unexpected value changes
This commit is contained in:
@@ -740,9 +740,15 @@ export class SnippetString {
|
||||
return this;
|
||||
}
|
||||
|
||||
appendChoice(values: string[], number?: number): SnippetString {
|
||||
this.appendPlaceholder(values.toString(), number);
|
||||
this.value = this.value.replace(/:/g, '|').replace(/}/g, '|}');
|
||||
appendChoice(values: string[], number: number = this._tabstop++): SnippetString {
|
||||
const value = SnippetString._escape(values.toString());
|
||||
|
||||
this.value += '${';
|
||||
this.value += number;
|
||||
this.value += '|';
|
||||
this.value += value;
|
||||
this.value += '|}';
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user