Skip to content

Commit e57d008

Browse files
committed
Using os.EOL instead of \n in generated output
Tests now pass on Windows.
1 parent 12deaf2 commit e57d008

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nginject-comments.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use strict";
22

3+
const os = require("os");
34
const is = require("simple-is");
45
const fmt = require("simple-fmt");
56

@@ -82,7 +83,7 @@ function visitNodeFollowingNgInjectComment(node, ctx) {
8283

8384
function addRemoveInjectArray(params, posAfterFunctionDeclaration, name) {
8485
const indent = getIndent(posAfterFunctionDeclaration);
85-
const str = fmt("\n{0}{1}.$inject = {2};", indent, name, ctx.stringify(params, ctx.quot));
86+
const str = fmt("{0}{1}{2}.$inject = {3};", os.EOL, indent, name, ctx.stringify(params, ctx.quot));
8687

8788
ctx.triggers.add({
8889
pos: posAfterFunctionDeclaration,

0 commit comments

Comments
 (0)