Merge pull request #107348 from jeanp413/fix-107220

Fixes SnippetString.appendChoice does not escape commas in choices
This commit is contained in:
Johannes Rieken
2020-09-24 13:52:28 +02:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -781,7 +781,7 @@ export class SnippetString {
}
appendChoice(values: string[], number: number = this._tabstop++): SnippetString {
const value = SnippetString._escape(values.toString());
const value = values.map(s => s.replace(/\$|}|\\|,/g, '\\$&')).join(',');
this.value += '${';
this.value += number;