Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Merge back PR's to master #12891

Merged
merged 8 commits into from
Nov 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,11 @@ define(function (require, exports, module) {
*/
Editor.prototype._resetText = function (text) {
var currentText = this._codeMirror.getValue();
if (text === currentText) {

// compare with ignoring line-endings, issue #11826
var textLF = text ? text.replace(/(\r\n|\r|\n)/g, "\n") : null;
var currentTextLF = currentText ? currentText.replace(/(\r\n|\r|\n)/g, "\n") : null;
if (textLF === currentTextLF) {
// there's nothing to reset
return;
}
Expand Down
Loading