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

cdocparser

Package Overview
Dependencies
Maintainers
3
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cdocparser - npm Package Compare versions

Comparing version 0.12.2 to 0.13.0

4

index.js

@@ -303,3 +303,3 @@ 'use strict';

// Parse the annotation.
var result = annotation.parse(getContent(line, match));
var result = annotation.parse(getContent(line, match), parsedComment, id);

@@ -314,3 +314,3 @@ // If it is a boolean use the annotaion as a flag

} else if (typeof parsedComment[name] === 'undefined'){
parsedComment[name] = annotation.parse(getContent(line, match));
parsedComment[name] = annotation.parse(getContent(line, match), parsedComment, id);
} else {

@@ -317,0 +317,0 @@ this.emit(

{
"name": "cdocparser",
"version": "0.12.2",
"version": "0.13.0",
"description": "Extract C style comments and extract context from source",

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

@@ -101,3 +101,3 @@ CDocParser

aRealAnnotation: {
parse : function (annotationLine) {
parse : function (annotationLine, info, id) {

@@ -124,2 +124,3 @@ },

description : "[Contains all comment lines without an annotation]",
commentRange : { start : [start], end : [end] },
[annotationName] : [resultOfAnnotationParser]

@@ -154,3 +155,3 @@ }

name : {
parse : function(line){
parse : function(line, info, id){

@@ -233,2 +234,8 @@ },

#### 0.13.0
* Fix a bug where only in `multiple:false` case meta-information where included in `annotation.parse`.
* Include `id` passed to `parse` method in every `annotation.parse` call.
#### 0.12.2

@@ -235,0 +242,0 @@

@@ -514,2 +514,32 @@ var fs = require('fs');

describe('# Pass in meta information about parsed object', function(){
it('should include meta information', function(done){
var annotations = {
_ : {
alias : { }
},
test : {
parse : function(line, info, id){
assert.equal(id, 'FileID');
assert.deepEqual(info, {"description":"","commentRange":{"start":1,"end":3},"context":{"type":"demo"}});
done();
},
multiple: false
}
};
parser = new docParser.CommentParser(annotations);
var extendedResult = parser.parse ([{
lines : ['@test hello'],
context : { type : 'demo' },
commentRange : { start : 1, end :3 }
}], 'FileID');
});
});
describe('File with CRLF', function(){

@@ -516,0 +546,0 @@ it('should extract comments', function (){

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