Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

allow tabs (#76) #86

Merged
merged 1 commit into from

2 participants

@stephenmathieson

your fix from #76 :)

@tj
Owner
tj commented

ewwwwww :pppp

@tj tj merged commit e88f133 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 27, 2013
  1. @stephenmathieson

    allow tabs

    stephenmathieson authored
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/dox.js
View
14 lib/dox.js
@@ -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,7 +273,7 @@ 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
@@ -281,7 +281,7 @@ exports.parseCodeContext = function(str){
, 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
Something went wrong with that request. Please try again.