This commit is contained in:
Johannes Rieken 2019-01-21 09:34:44 -08:00
parent 3b4cea2aa0
commit dc0e64414e
2 changed files with 7 additions and 1 deletions

View file

@ -930,7 +930,7 @@ export class SnippetParser {
let escaped: string;
if (escaped = this._accept(TokenType.Backslash, true)) {
escaped = this._accept(TokenType.Forwardslash, true) || escaped;
escaped = this._accept(TokenType.Backslash, true) || this._accept(TokenType.Forwardslash, true) || escaped;
transform.appendChild(new Text(escaped));
continue;
}

View file

@ -748,4 +748,10 @@ suite('SnippetParser', () => {
let [, , clone] = snippet.children;
assertParent(clone);
});
test('Backspace can\'t be escaped in snippet variable transforms #65412', function () {
let snippet = new SnippetParser().parse('namespace ${TM_DIRECTORY/[\\/]/\\\\/g};');
assertMarker(snippet, Text, Variable, Text);
});
});