New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

coffee-lex

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coffee-lex - npm Package Compare versions

Comparing version 7.0.6 to 7.0.7

16

dist/utils/calculateTripleQuotedStringPadding.js

@@ -137,10 +137,21 @@ "use strict";

}
/**
* Mimic the STRING_OMIT regex from the CoffeeScript lexer, and split on all
* newlines that remain after that operation. That operation finds all escaped
* newlines (which may have a backslash, then any number of spaces, then a
* newline), and removes everything from the backslash to the next
* non-whitespace character (so it may skip later newlines).
*/
function splitUnescapedNewlines(str) {
var lines = [''];
var numBackslashes = 0;
var isEatingWhitespace = false;
for (var i = 0; i < str.length; i++) {
if (str[i] === '\n' && numBackslashes % 2 === 0) {
if (str[i] === '\n' && numBackslashes % 2 === 0 && !isEatingWhitespace) {
lines.push('');
}
else {
if (str[i] === '\n' && numBackslashes % 2 === 1) {
isEatingWhitespace = true;
}
if (str[i] === '\\') {

@@ -152,2 +163,5 @@ numBackslashes++;

}
if (!' \t\n'.includes(str[i])) {
isEatingWhitespace = false;
}
lines[lines.length - 1] += str[i];

@@ -154,0 +168,0 @@ }

2

package.json

@@ -48,3 +48,3 @@ {

},
"version": "7.0.6"
"version": "7.0.7"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc