@nteract/commutable
Advanced tools
Comparing version 7.0.1 to 7.0.2
@@ -18,3 +18,3 @@ import { remultiline } from "../src/primitives"; | ||
expect(remultiline("test\n\n\nthis\n\nout").map(flagNewlines)).toEqual( | ||
["test\n", "\n\n", "this\n", "\nout"].map(flagNewlines) | ||
["test\n", "\n", "\n", "this\n", "\n", "out"].map(flagNewlines) | ||
); | ||
@@ -25,5 +25,3 @@ | ||
).toEqual( | ||
// This shows the super weird case with ours which is a bunch of | ||
// newlines before the last line... | ||
["test\n", "\n\n", "this\n", "\n", "out\n", "\n\n\n\n\nwhat"].map( | ||
["test\n", "\n", "\n", "this\n", "\n", "out\n", "\n", "\n", "\n", "\n", "\n", "what"].map( | ||
flagNewlines | ||
@@ -30,0 +28,0 @@ ) |
@@ -30,4 +30,4 @@ "use strict"; | ||
} | ||
// Use positive lookahead regex to split on newline and retain newline char | ||
return s.split(/(.+?(?:\r\n|\n))/g).filter(x => x !== ""); | ||
// Split on newline and retain newline char | ||
return s.split(/(.*?(?:\r\n|\n))/g).filter(x => x !== ""); | ||
} | ||
@@ -34,0 +34,0 @@ exports.remultiline = remultiline; |
{ | ||
"name": "@nteract/commutable", | ||
"version": "7.0.1", | ||
"version": "7.0.2", | ||
"description": "library for immutable notebook operations", | ||
@@ -27,3 +27,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "9f53f825b6d7920780490143c2dad53675248b12" | ||
"gitHead": "dec904e957590ef262d81e8ef567852864a27a54" | ||
} |
@@ -118,4 +118,4 @@ /** | ||
} | ||
// Use positive lookahead regex to split on newline and retain newline char | ||
return s.split(/(.+?(?:\r\n|\n))/g).filter(x => x !== ""); | ||
// Split on newline and retain newline char | ||
return s.split(/(.*?(?:\r\n|\n))/g).filter(x => x !== ""); | ||
} | ||
@@ -122,0 +122,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
87245
2471