mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 04:17:37 +00:00
fix #65412
This commit is contained in:
parent
3b4cea2aa0
commit
dc0e64414e
2 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue