提交 7810d7a9 编写于 作者: J Johannes Rieken

backslash escapes backslash, #16212

上级 728ca1dc
......@@ -373,7 +373,7 @@ export class SnippetParser {
if (// Internal style
(this._enableInternal && (this._accept(TokenType.CurlyOpen) || this._accept(TokenType.CurlyClose) || this._accept(TokenType.Backslash)))
// TextMate style
|| (this._enableTextMate && (this._accept(TokenType.Dollar) || this._accept(TokenType.CurlyClose)))
|| (this._enableTextMate && (this._accept(TokenType.Dollar) || this._accept(TokenType.CurlyClose) || this._accept(TokenType.Backslash)))
) {
// just consume them
}
......
......@@ -281,4 +281,9 @@ suite('SnippetParser', () => {
assert.equal((<Text>(<Placeholder>p2).defaultValue[0]), 'err');
});
test('backspace esapce in TM only, #16212', () => {
const actual = new SnippetParser(true, false).escape('Foo \\\\${abc}bar');
assert.equal(actual, 'Foo \\bar');
});
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册