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

scss-comment-parser

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scss-comment-parser - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

13

index.js

@@ -97,2 +97,9 @@ var CDocParser = require('cdocparser');

var addCodeToContext = function(context, ctxCode, match){
var codeStart = ctxCode.indexOf('{', match.index);
if (codeStart >= 0) {
context.code = extractCode(ctxCode, codeStart);
}
};
/**

@@ -113,9 +120,7 @@ * SCSS Context Parser

context.name = match[3];
var codeStart = ctxCode.indexOf('{', match.index + match[0].length);
if (codeStart >= 0) {
context.code = extractCode(ctxCode, codeStart);
}
addCodeToContext(context, ctxCode, match);
} else if (match[1] === '%') {
context.type = 'placeholder';
context.name = match[2];
addCodeToContext(context, ctxCode, match);
} else if (match[1] === '$') {

@@ -122,0 +127,0 @@ context.type = 'variable';

{
"name": "scss-comment-parser",
"version": "0.3.1",
"version": "0.3.2",
"description": "Parses scss comments to build documentation",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -41,2 +41,5 @@ scss-comment-parser [![Build Status](https://travis-ci.org/SassDoc/scss-comment-parser.svg?branch=master)](https://travis-ci.org/SassDoc/scss-comment-parser)

#### `0.3.2`
* Added `context.code` to type `placeholder`.
#### `0.3.1`

@@ -43,0 +46,0 @@ * Update to [`cdocparser`](https://github.com/FWeinb/CDocParser) 0.2.1

@@ -42,2 +42,3 @@ var fs = require('fs');

assert.equal(result['function'][0].context.code, '\n $some : "code";\n');
assert.equal(result.placeholder[0].context.code, '\n $some : "code";\n');
assert.equal(result.mixin[0].context.code, '\n $some : "code}}";\n /* } */\n // }\n');

@@ -44,0 +45,0 @@ });

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