diff --git a/jsdoc b/jsdoc index 55938403..14c31656 100755 --- a/jsdoc +++ b/jsdoc @@ -8,6 +8,7 @@ BASEPATH="$( cd -P "$( dirname "$SOURCE" )" && pwd )" # for whatever reason, Rhino requires module paths to be valid URIs URLPATH="file://"$BASEPATH URLPATH=`echo "$URLPATH" | sed -e 's/ /%20/g'` +ENCODEDBASEPATH=`echo "$BASEPATH" | sed -e 's/ /%20/g'` if test $1 = "--debug" then diff --git a/jsdoc.js b/jsdoc.js index 6e13842e..edccab9b 100644 --- a/jsdoc.js +++ b/jsdoc.js @@ -76,7 +76,7 @@ function include(filepath) { load(filepath); } catch (e) { - console.log('Cannot include "' + __dirname + '/' + filepath + '": '+e); + console.log('Cannot include "' + filepath + '": '+e); } } include.resolve = function(filepath) { diff --git a/rhino_modules/jsdoc/src/parser.js b/rhino_modules/jsdoc/src/parser.js index 3a05be7d..5346292d 100644 --- a/rhino_modules/jsdoc/src/parser.js +++ b/rhino_modules/jsdoc/src/parser.js @@ -349,7 +349,7 @@ function visitNode(node) { else if (node.type === Token.ASSIGN) { e = { id: 'astnode'+node.hashCode(), // the id of the ASSIGN node - comment: String(node.jsDoc||'@undocumented'), + comment: String(node.getJsDoc()||'@undocumented'), lineno: node.left.getLineno(), filename: currentSourceName, astnode: node, @@ -365,7 +365,7 @@ function visitNode(node) { else if (node.type === Token.COLON) { // assignment within an object literal e = { id: 'astnode'+node.hashCode(), // the id of the COLON node - comment: String(node.left.jsDoc||'@undocumented'), + comment: String(node.left.getJsDoc()||'@undocumented'), lineno: node.left.getLineno(), filename: currentSourceName, astnode: node, @@ -382,12 +382,13 @@ function visitNode(node) { if (node.parent.variables.toArray()[0] === node) { // like /** blah */ var a=1, b=2, c=3; // the first var assignment gets any jsDoc before the whole var series - node.jsDoc = node.parent.jsDoc; + if (typeof node.setJsDoc !== 'undefined') { node.setJsDoc( node.parent.getJsDoc() ); } + //node.jsDoc = node.parent.jsDoc; } e = { id: 'astnode'+node.hashCode(), // the id of the VARIABLE node - comment: String(node.jsDoc||'@undocumented'), + comment: String(node.getJsDoc()||'@undocumented'), lineno: node.getLineno(), filename: currentSourceName, astnode: node, @@ -412,7 +413,7 @@ function visitNode(node) { else if (node.type == Token.FUNCTION || node.type == tkn.NAMEDFUNCTIONSTATEMENT) { e = { id: 'astnode'+node.hashCode(), // the id of the COLON node - comment: String(node.jsDoc||'@undocumented'), + comment: String(node.getJsDoc()||'@undocumented'), lineno: node.getLineno(), filename: currentSourceName, astnode: node,