Browse files

fix --api .receiver

  • Loading branch information...
1 parent 59a0417 commit dca79c25d509af77b9e5abd30ecad56eaeaf532d @tj committed Oct 16, 2012
Showing with 3 additions and 1 deletion.
  1. +1 −1 lib/api.js
  2. +2 −0 lib/dox.js
View
2 lib/api.js
@@ -24,7 +24,7 @@ function context(comment) {
var tags = comment.tags;
switch (ctx.type) {
case 'method':
- return ctx.constructor + '#' + ctx.name + '(' + params(tags) + ')';
+ return (ctx.cons || ctx.receiver) + '#' + ctx.name + '(' + params(tags) + ')';
default:
return ctx.string;
}
View
2 lib/dox.js
@@ -258,6 +258,7 @@ exports.parseCodeContext = function(str){
return {
type: 'method'
, constructor: RegExp.$1
+ , cons: RegExp.$1
, name: RegExp.$2
, string: RegExp.$1 + '.prototype.' + RegExp.$2 + '()'
};
@@ -266,6 +267,7 @@ exports.parseCodeContext = function(str){
return {
type: 'property'
, constructor: RegExp.$1
+ , cons: RegExp.$1
, name: RegExp.$2
, value: RegExp.$3
, string: RegExp.$1 + '.prototype' + RegExp.$2

0 comments on commit dca79c2

Please sign in to comment.