Permalink
Browse files

Merge pull request #86 from stephenmathieson/master

allow tabs (#76)
  • Loading branch information...
2 parents 895735b + 5a1f137 commit e88f133418ccc837ad2fb4faaacf7e1dbded5ce8 @tj committed Feb 27, 2013
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/dox.js
View
@@ -155,7 +155,7 @@ exports.parseComment = function(str, options) {
*/
exports.parseTag = function(str) {
- var tag = {}
+ var tag = {}
, parts = str.split(/ +/)
, type = tag.type = parts.shift().replace('@', '');
@@ -247,14 +247,14 @@ exports.parseCodeContext = function(str){
, string: RegExp.$1 + '()'
};
// function expression
- } else if (/^var *(\w+) *= *function/.exec(str)) {
+ } else if (/^var *(\w+)[ \t]*=[ \t]*function/.exec(str)) {
return {
type: 'function'
, name: RegExp.$1
, string: RegExp.$1 + '()'
};
// prototype method
- } else if (/^(\w+)\.prototype\.(\w+) *= *function/.exec(str)) {
+ } else if (/^(\w+)\.prototype\.(\w+)[ \t]*=[ \t]*function/.exec(str)) {
return {
type: 'method'
, constructor: RegExp.$1
@@ -263,7 +263,7 @@ exports.parseCodeContext = function(str){
, string: RegExp.$1 + '.prototype.' + RegExp.$2 + '()'
};
// prototype property
- } else if (/^(\w+)\.prototype\.(\w+) *= *([^\n;]+)/.exec(str)) {
+ } else if (/^(\w+)\.prototype\.(\w+)[ \t]*=[ \t]*([^\n;]+)/.exec(str)) {
return {
type: 'property'
, constructor: RegExp.$1
@@ -273,15 +273,15 @@ exports.parseCodeContext = function(str){
, string: RegExp.$1 + '.prototype' + RegExp.$2
};
// method
- } else if (/^([\w.]+)\.(\w+) *= *function/.exec(str)) {
+ } else if (/^([\w.]+)\.(\w+)[ \t]*=[ \t]*function/.exec(str)) {
return {
type: 'method'
, receiver: RegExp.$1
, name: RegExp.$2
, string: RegExp.$1 + '.' + RegExp.$2 + '()'
};
// property
- } else if (/^(\w+)\.(\w+) *= *([^\n;]+)/.exec(str)) {
+ } else if (/^(\w+)\.(\w+)[ \t]*=[ \t]*([^\n;]+)/.exec(str)) {
return {
type: 'property'
, receiver: RegExp.$1
@@ -290,7 +290,7 @@ exports.parseCodeContext = function(str){
, string: RegExp.$1 + '.' + RegExp.$2
};
// declaration
- } else if (/^var +(\w+) *= *([^\n;]+)/.exec(str)) {
+ } else if (/^var +(\w+)[ \t]*=[ \t]*([^\n;]+)/.exec(str)) {
return {
type: 'declaration'
, name: RegExp.$1

0 comments on commit e88f133

Please sign in to comment.