Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stylus-help

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylus-help - npm Package Compare versions

Comparing version 1.7.3 to 1.7.4

56

lib/stylus-help.js

@@ -95,3 +95,3 @@ // Generated by CoffeeScript 1.8.0

processData = function(command, args) {
var addError, alphabetizeCheck, arr, attributeSet, attribute_info, breathing_room, buf, config, count, data, file, file_name, files, filesTotal, indent, infractions, join, line, line_num, line_number, num, obj, postJsonChecks, preJsonChecks, pre_spaces, processed, read_files, reg, rules, sizeOf, tag, tagFound, tag_found_test, total_return, val, validate, validateInfranction, z_index, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m;
var addError, alphabetizeCheck, arr, attributeSet, attribute_info, breathing_room, buf, config, count, data, file, file_name, files, filesTotal, indent, infractions, join, line, line_indent, line_num, line_number, obj, parentIdentation, parentLine, postJsonChecks, preJsonChecks, pre_spaces, prev_indent, processed, read_files, reg, rules, sizeOf, tag, tagFound, tag_found_test, tags, total_return, val, validate, validateInfranction, z_index, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _tag;
read_files = getFiles(args);

@@ -213,3 +213,3 @@ switch (command) {

if (no_colon_semicolon) {
if (/;|:/.test(attribute)) {
if (/;|:/.test(attribute && !/url/.test(attribute))) {
addError(no_colon_semicolon, attribute, line + key, file_name);

@@ -297,2 +297,3 @@ }

case 'convertStyleToJson':
tag_found_test = /(^.+(\[.+\])$)|((\n|^)(\s)*(\.|&|>|\#|@media|\:\:\-).+)|(\n|^)(\s)*(table|td|th|tr|div|span|a|h1|h2|h3|h4|h5|h6|strong|em|quote|form|fieldset|label|input|textarea|button|body|img|ul|li|html|object|iframe|p|blockquote|abbr|address|cite|del|dfn|ins|kbd|q|samp|sup|var|b|i|dl|dt|dd|ol|legend|caption|tbody|tfoot|thead|article|aside|canvas|details|figcaption|figure|footer|header|hgroup|menu|nav|section|summary|time|mark|audio|video|svg|gcircle|path|text|ellipse|line|polygon|polyline)(\:.+|,|\s|\.|$).*/;
validate = (function(_this) {

@@ -339,3 +340,2 @@ return function(_arg) {

obj = {};
tag_found_test = /(^.+(\[.+\])$)|((\n|^)(\s)*(\.|&|>|\#|@media).+)|(\n|^)(\s)*(table|td|th|tr|div|span|a|h1|h2|h3|h4|h5|h6|strong|em|quote|form|fieldset|label|input|textarea|button|body|img|ul|li|html|object|iframe|p|blockquote|abbr|address|cite|del|dfn|ins|kbd|q|samp|sup|var|b|i|dl|dt|dd|ol|legend|caption|tbody|tfoot|thead|article|aside|canvas|details|figcaption|figure|footer|header|hgroup|menu|nav|section|summary|time|mark|audio|video|circle|path|text|ellipse|line|polygon|polyline)(\:.+|,|\s|\.|$).*/;
data = fs.readFileSync(file, 'utf8');

@@ -347,4 +347,7 @@ data = data.split('\n');

indent = 0;
for (num = _j = 0, _len1 = data.length; _j < _len1; num = ++_j) {
line = data[num];
line_num = 0;
parentIdentation = 0;
tags = {};
for (line_num = _j = 0, _len1 = data.length; _j < _len1; line_num = ++_j) {
line = data[line_num];
line = line != null ? line.replace(/^\s*\/\/.+/, '') : void 0;

@@ -354,7 +357,6 @@ if (line.match(/^\s*$/)) {

}
line_num = num;
if (tag_found_test.test(line)) {
tagFound = true;
if (attributeSet.length) {
line_number = line_num + 1 - attributeSet.length;
line_number = parseInt(line_num, 10) + 1 - attributeSet.length;
if (validate({

@@ -373,3 +375,17 @@ tag: tag,

}
tag = line;
line_indent = getPreSpaces(line);
tags[line_indent] = line;
prev_indent = line_indent - 1;
_tag = '';
parentLine = function() {
if (prev_indent < 0) {
return _tag;
}
if (tags[prev_indent]) {
_tag = join(tags[prev_indent], _tag);
}
prev_indent--;
return parentLine();
};
tag = join(parentLine(), line);
} else if (tagFound) {

@@ -386,3 +402,3 @@ pre_spaces = getPreSpaces(line);

} else {
line_number = line_num - attributeSet.length;
line_number = parseInt(line_num, 10) - attributeSet.length;
if (validate({

@@ -404,12 +420,14 @@ tag: tag,

}
line_number = line_num + 1 - attributeSet.length;
if (validate({
tag: tag,
rules: attributeSet
})) {
obj[line_number] = {
indent: indent,
rules: attributeSet,
tag: tag.trim()
};
if (attributeSet.length) {
line_number = parseInt(line_num, 10) + 1 - attributeSet.length;
if (validate({
tag: tag,
rules: attributeSet
})) {
obj[line_number] = {
indent: getPreSpaces(line),
rules: attributeSet,
tag: tag.trim()
};
}
}

@@ -416,0 +434,0 @@ total_return[file] = obj;

@@ -21,3 +21,4 @@ {

"optimist": "0.6.x",
"async": "0.9.x"
"async": "0.9.x",
"columnify": "1.2.x"
},

@@ -42,3 +43,3 @@ "devDependencies": {

},
"version": "1.7.3"
"version": "1.7.4"
}

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