提交 47eafd09 编写于 作者: S Sandeep Somavarapu

fix #11891

上级 9da8d359
......@@ -7,9 +7,6 @@ import * as strings from 'vs/base/common/strings';
import {IPatternInfo} from 'vs/platform/search/common/search';
import {CharCode} from 'vs/base/common/charCode';
const BACK_TICK_CHAR_CODE = '`'.charCodeAt(0);
const SINGLE_QUOTE_CHAR_CODE = '`'.charCodeAt(0);
export class ReplacePattern {
private _replacePattern: string;
......@@ -138,8 +135,8 @@ export class ReplacePattern {
replaceWithCharacter = '$&';
this._hasParameters = true;
break;
case BACK_TICK_CHAR_CODE:
case SINGLE_QUOTE_CHAR_CODE:
case CharCode.BackTick:
case CharCode.SingleQuote:
this._hasParameters = true;
break;
default:
......
......@@ -73,6 +73,9 @@ suite('Replace Pattern test', () => {
// $0 => $&
testParse('hello$0', 'hello$&', true);
testParse('hello$02', 'hello$&2', true);
testParse('hello$`', 'hello$`', true);
testParse('hello$\'', 'hello$\'', true);
});
test('create pattern by passing regExp', () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册