doctor
Advanced tools
Comparing version 0.1.29 to 0.1.30
@@ -5,3 +5,3 @@ { | ||
"description": "Create documentation from a JavaScript AST.", | ||
"version": "0.1.29", | ||
"version": "0.1.30", | ||
"homepage": "https://github.com/jdeal/doctor", | ||
@@ -8,0 +8,0 @@ "repository": { |
@@ -909,10 +909,12 @@ var Path = require('path'); | ||
} | ||
var methods = classVar.properties.prototype.properties; | ||
_(methods).each(function (method, methodName) { | ||
items = items.concat(functionReportItems(method.node, method.value, methodName, { | ||
isMethod: true, | ||
key: node.item('module') + '.class.' + className + '.' + methodName, | ||
groups: [groupName] | ||
})); | ||
}); | ||
if (classVar.properties.prototype && classVar.properties.prototype.properties) { | ||
var methods = classVar.properties.prototype.properties; | ||
_(methods).each(function (method, methodName) { | ||
items = items.concat(functionReportItems(method.node, method.value, methodName, { | ||
isMethod: true, | ||
key: node.item('module') + '.class.' + className + '.' + methodName, | ||
groups: [groupName] | ||
})); | ||
}); | ||
} | ||
}); | ||
@@ -919,0 +921,0 @@ return items; |
@@ -53,2 +53,13 @@ /*global suite:false, test:false*/ | ||
test('description separated by dash in param tag', function() { | ||
var comment = "@param s - description"; | ||
var ast = parser.parse(comment); | ||
assert.equal(ast.length, 1); | ||
var tag = ast[0]; | ||
assert.equal(tag.value.name, 's'); | ||
assert.equal(tag.value.description, 'description'); | ||
}); | ||
test('class and constructor description', function () { | ||
@@ -88,2 +99,13 @@ var comment = "@class class description\n" + | ||
test('description separated by dash in property tag', function() { | ||
var comment = "@property propTwo - property two description"; | ||
var ast = parser.parse(comment); | ||
assert.equal(ast.length, 1); | ||
var tag = ast[0]; | ||
assert.equal(tag.value.name, 'propTwo'); | ||
assert.equal(tag.value.description, 'property two description'); | ||
}); | ||
test('example', function () { | ||
@@ -90,0 +112,0 @@ var comment = '@example\n' + |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
5643667
87702