Skip to content

Commit baf9d1d

Browse files
committed
Revert "Fixes #924, some files only have carriage returns, no newlines"
This reverts commit cc7bfe7.
1 parent 5d84eea commit baf9d1d

File tree

8 files changed

+0
-75
lines changed

8 files changed

+0
-75
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ build/tests/lib/anonUmdInteriorModules/main-built.js
88
build/tests/lib/appDirSrcOverwrite/www-built
99
build/tests/lib/arrow/main-built.js
1010
build/tests/lib/bundlesConfig/built
11-
build/tests/lib/carriageReturn/built.js
1211
build/tests/lib/cjsTranslate/www-built
1312
build/tests/lib/closureExterns/built
1413
build/tests/lib/comments/built.js

build/jslib/transform.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -217,17 +217,6 @@ function (esprima, parse, logger, lang) {
217217
//start.line is 1-based, not 0 based.
218218
lineIndex = loc.start.line - 1,
219219
line = contentLines[lineIndex];
220-
221-
if (!line) {
222-
//In rare cases, file contains just \r instead of \r\n, so
223-
//adjust the contentLines and try again.
224-
//https://github.com/requirejs/r.js/issues/924
225-
if (contents.indexOf('\r') !== -1) {
226-
contentLines = contents.split('\r');
227-
}
228-
line = contentLines[lineIndex];
229-
}
230-
231220
contentLines[lineIndex] = line.substring(0, startIndex) +
232221
contentInsertion +
233222
line.substring(startIndex,

build/tests/builds.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2853,22 +2853,4 @@ define(['build', 'env!env/file', 'env', 'lang'], function (build, file, env, lan
28532853
);
28542854
doh.run();
28552855

2856-
//Test build with file that has no newlines just carriage returns.
2857-
//See https://github.com/requirejs/r.js/issues/924
2858-
doh.register("carriageReturn",
2859-
[
2860-
function carriageReturn(t) {
2861-
file.deleteFile("lib/carriageReturn/built.js");
2862-
2863-
build(["lib/carriageReturn/build.js"]);
2864-
2865-
t.is(nol(c("lib/carriageReturn/expected.js")),
2866-
nol(c("lib/carriageReturn/built.js")));
2867-
require._buildReset();
2868-
}
2869-
2870-
]
2871-
);
2872-
doh.run();
2873-
28742856
});

build/tests/lib/carriageReturn/build.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

build/tests/lib/carriageReturn/expected.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

build/tests/lib/carriageReturn/loginModule.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

build/tests/lib/carriageReturn/modules/login/loginController.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

build/tests/lib/carriageReturn/modules/login/loginService.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)