comment-parser
Advanced tools
Comparing version 0.1.1 to 0.1.2
# v0.1.2 | ||
- `bugfix` Allow to build nested tags from `name.subname` even if `name` wasn't d | ||
- `bugfix` Preserve indentation when extracting comments | ||
# v0.1.1 | ||
@@ -3,0 +8,0 @@ |
12
index.js
@@ -10,3 +10,3 @@ | ||
var RE_COMMENT_START = /^\s*\/\*\*\s*$/m; | ||
var RE_COMMENT_LINE = /^\s*\*(?:\s+|$)/m; | ||
var RE_COMMENT_LINE = /^\s*\*(?:\s|$)/m; | ||
var RE_COMMENT_END = /^\s*\*\/\s*$/m; | ||
@@ -65,3 +65,11 @@ | ||
if (!parent_tag) { return tags; } | ||
if (!parent_tag) { | ||
parent_tag = { | ||
tag : tag.tag, | ||
name : parent_name, | ||
type : '', | ||
description : '' | ||
} | ||
parent_tags.push(parent_tag); | ||
} | ||
@@ -68,0 +76,0 @@ parent_tag.tags = parent_tag.tags || []; |
{ | ||
"name": "comment-parser", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Generic JSDoc-like comment parser. ", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -196,14 +196,2 @@ var fs = require('fs'); | ||
it('should skip invalid tags', function() { | ||
expect(parsed(function(){ | ||
/** | ||
* @my-tag {my.type | ||
*/ | ||
})[0]) | ||
.to.eql({ | ||
description : '', | ||
tags : [] | ||
}); | ||
}); | ||
it('should parse multiple tags', function() { | ||
@@ -210,0 +198,0 @@ expect(parsed(function(){ |
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
16168
457