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

rocambole-indent

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rocambole-indent - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

CHANGELOG.md
# rocambole-indent changelog
## v1.1.1 (2015-03-25)
- fix `WhiteSpace` conversion into `Indent` inside `alignComments()`
## v1.1.0 (2015-03-25)

@@ -4,0 +8,0 @@

2

package.json
{
"name": "rocambole-indent",
"version": "1.1.0",
"version": "1.1.1",
"description": "helpers for rocambole AST indentation",

@@ -5,0 +5,0 @@ "main": "rocambole-indent.js",

@@ -187,10 +187,10 @@ 'use strict';

if (!base) {
if (tk.isIndent(token.prev) || tk.isWs(token.prev)) {
if (isIndentOrWs(token.prev)) {
tk.remove(token.prev);
}
} else {
if (tk.isIndent(token.prev) || tk.isWs(token.prev)) {
if (isIndentOrWs(token.prev)) {
// we reuse whitespace just because user might not have converted all
// the whitespaces into Indent tokens
token.type = 'Indent';
token.prev.type = 'Indent';
token.prev.value = base.value;

@@ -226,5 +226,5 @@ token.prev.level = base.level;

if (tk.isBr(nextLine) || !nextLine) {
return tk.isIndent(prevLine) || tk.isWs(prevLine) ? prevLine : null;
return isIndentOrWs(prevLine) ? prevLine : null;
}
return tk.isIndent(nextLine) || tk.isWs(nextLine) ? nextLine : null;
return isIndentOrWs(nextLine) ? nextLine : null;
}

@@ -260,2 +260,6 @@

function isIndentOrWs(token) {
return tk.isIndent(token) || tk.isWs(token);
}
function nextInLineNotComment(token) {

@@ -262,0 +266,0 @@ token = token.next;

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