提交 71ed221b 编写于 作者: M Maira Wenzel

fix typo

上级 b80e8133
...@@ -94,8 +94,8 @@ function doWrapping(individualLines: boolean, args: any) { ...@@ -94,8 +94,8 @@ function doWrapping(individualLines: boolean, args: any) {
} else { } else {
const wholeFirstLine = editor.document.lineAt(rangeToReplace.start).text; const wholeFirstLine = editor.document.lineAt(rangeToReplace.start).text;
const otherMatches = wholeFirstLine.match(/^(\s*)/); const otherMatches = wholeFirstLine.match(/^(\s*)/);
const preceedingWhitespace = otherMatches ? otherMatches[1] : ''; const precedingWhitespace = otherMatches ? otherMatches[1] : '';
textToWrapInPreview = rangeToReplace.isSingleLine ? [textToReplace] : ['\n\t' + textToReplace.split('\n' + preceedingWhitespace).join('\n\t') + '\n']; textToWrapInPreview = rangeToReplace.isSingleLine ? [textToReplace] : ['\n\t' + textToReplace.split('\n' + precedingWhitespace).join('\n\t') + '\n'];
} }
textToWrapInPreview = textToWrapInPreview.map(e => e.replace(/(\$\d)/g, '\\$1')); textToWrapInPreview = textToWrapInPreview.map(e => e.replace(/(\$\d)/g, '\\$1'));
......
...@@ -594,7 +594,7 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider ...@@ -594,7 +594,7 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider
): boolean { ): boolean {
if (this.client.apiVersion.lt(API.v320)) { if (this.client.apiVersion.lt(API.v320)) {
// Workaround for https://github.com/Microsoft/TypeScript/issues/27742 // Workaround for https://github.com/Microsoft/TypeScript/issues/27742
// Only enable dot completions when previous character not a dot preceeded by whitespace. // Only enable dot completions when previous character not a dot preceded by whitespace.
// Prevents incorrectly completing while typing spread operators. // Prevents incorrectly completing while typing spread operators.
if (position.character > 1) { if (position.character > 1) {
const preText = document.getText(new vscode.Range( const preText = document.getText(new vscode.Range(
......
...@@ -532,7 +532,7 @@ export type IRgBytesOrText = { bytes: string } | { text: string }; ...@@ -532,7 +532,7 @@ export type IRgBytesOrText = { bytes: string } | { text: string };
export function fixRegexNewline(pattern: string): string { export function fixRegexNewline(pattern: string): string {
// Replace an unescaped $ at the end of the pattern with \r?$ // Replace an unescaped $ at the end of the pattern with \r?$
// Match $ preceeded by none or even number of literal \ // Match $ preceded by none or even number of literal \
return pattern.replace(/(?<=[^\\]|^)(\\\\)*\\n/g, '$1\\r?\\n'); return pattern.replace(/(?<=[^\\]|^)(\\\\)*\\n/g, '$1\\r?\\n');
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册