Merge branch 'master' into 553_find_api
This commit is contained in:
@@ -9,6 +9,6 @@ describe('evaluatePastedTextProcessing', function () {
|
|||||||
windowsProcessedText = Clipboard.prepareTextForTerminal(pastedText, true);
|
windowsProcessedText = Clipboard.prepareTextForTerminal(pastedText, true);
|
||||||
|
|
||||||
assert.equal(processedText, 'foo\r\nbar\r\n');
|
assert.equal(processedText, 'foo\r\nbar\r\n');
|
||||||
assert.equal(windowsProcessedText, 'foo\nbar\n');
|
assert.equal(windowsProcessedText, 'foo\rbar\r');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ declare var window: IWindow;
|
|||||||
*/
|
*/
|
||||||
export function prepareTextForTerminal(text: string, isMSWindows: boolean): string {
|
export function prepareTextForTerminal(text: string, isMSWindows: boolean): string {
|
||||||
if (isMSWindows) {
|
if (isMSWindows) {
|
||||||
return text.replace(/\r?\n/g, '\n');
|
return text.replace(/\r?\n/g, '\r');
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user