cdocparser
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -48,3 +48,3 @@ 'use strict'; | ||
var CommentParser = (function(){ | ||
var annotationRegex = /^\s*@(\w+)/; | ||
var annotationRegex = /^@(\w+)/; | ||
@@ -51,0 +51,0 @@ function CommentParser (annotations) { |
{ | ||
"name": "cdocparser", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "Extract C style comments and extract context from source", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -64,2 +64,3 @@ var assert = require("assert"); | ||
{ lines : ['test', 'test', '@test'], context : { type : 'testType1'} }, | ||
{ lines : ['test', 'test', ' @test'], context : { type : 'testType1'} }, | ||
{ lines : ['test', 'test', '@aliasTest'], context : { type : 'testType2'} }, | ||
@@ -97,3 +98,3 @@ { lines : ['test', 'test', '@test'], context : { type : 'testType2'} }, | ||
var result = parser.parse ( comments ); | ||
assert.equal(result.testType1.length , 1); | ||
assert.equal(result.testType1.length , 2); | ||
assert.equal(result.testType2.length , 2); | ||
@@ -105,3 +106,3 @@ assert.equal(result.testType3.length , 3); | ||
var result = parser.parse ( comments ); | ||
assert.equal(result.testType1.length , 1); | ||
assert.equal(result.testType1.length , 2); | ||
assert.equal(result.testType1[0].description , 'test\ntest\n'); | ||
@@ -127,4 +128,9 @@ }); | ||
it('should ignore annotations that aren\'t at the start of the line', function(){ | ||
var result = parser.parse ( comments ); | ||
assert.equal(result.testType1[1].test , undefined); | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10512
196