提交 c73d4d34 编写于 作者: R Ramya Achutha Rao

Escape $ when its not a placeholder

上级 f21c311e
......@@ -233,7 +233,7 @@ function expandAbbr(input: ExpandAbbreviationInput, newLine: string): string {
try {
expandedText = expand(input.abbreviation, expandOptions);
if (input.textToWrap && input.textToWrap !== selectedTextToWrap) {
expandedText = expandedText.replace(/\$/g, '\\$');
expandedText = expandedText.replace(/(\$[^\{])/g, '\\$&');
}
} catch (e) {
vscode.window.showErrorMessage('Failed to expand abbreviation');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册