diff --git a/modules/jsdoc/package.js b/modules/jsdoc/package.js index 84a41932..e4fcbf25 100644 --- a/modules/jsdoc/package.js +++ b/modules/jsdoc/package.js @@ -23,12 +23,14 @@ /** The kind of this package. @readonly @default + @type {string} */ this.kind = 'package'; json = JSON.parse(json); /** The name of this package. + This value is found in the package.json file passed in as a command line option. @type {string} */ this.name = json.name; @@ -43,8 +45,10 @@ */ this.description = json.description; - /** The version of this package. + /** + The hash summary of the source file. @type {string} + @since 3.2.0 */ this.version = json.version; @@ -55,7 +59,7 @@ * "licenses": [ * { * "type": "GPLv2", - * "url": "http://www.example.com/licenses/gpl.html", + * "url": "http://www.example.com/licenses/gpl.html" * } * ] */ diff --git a/modules/jsdoc/src/handlers.js b/modules/jsdoc/src/handlers.js index 368cb5e0..20cc02de 100644 --- a/modules/jsdoc/src/handlers.js +++ b/modules/jsdoc/src/handlers.js @@ -27,7 +27,15 @@ // handles named symbols in the code, may or may not have a JSDoc comment attached parser.on('symbolFound', function(e) { - var newDoclet = new jsdoc.doclet.Doclet(e.comment, e); + var subDoclets = e.comment.split(/@also\b/g); + + for (var i = 0, l = subDoclets.length; i < l; i++) { + newSymbolDoclet.call(this, subDoclets[i], e); + } + }); + + function newSymbolDoclet(docletSrc, e) { + var newDoclet = new jsdoc.doclet.Doclet(docletSrc, e); // an undocumented symbol right after a virtual comment? rhino mistakenly connected the two if (newDoclet.name) { // there was a @name in comment @@ -92,7 +100,7 @@ addDoclet.call(this, newDoclet); e.doclet = newDoclet; - }); + } //parser.on('fileBegin', function(e) { }); diff --git a/package.json b/package.json index cd417eeb..463fe830 100644 --- a/package.json +++ b/package.json @@ -1,33 +1,36 @@ { "name": "jsdoc", "version": "3.0.0beta1", - "revision": "2011-02-05-2259", + "revision": "2011-02-06-0040", "description": "An automatic documentation generator for javascript.", "keywords": [ "documentation", "javascript" ], "licenses": [ { "type": "Apache 2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" + "url": "http://www.apache.org/licenses/LICENSE-2.0" } ], "repositories": [ { "type": "git", - "url": "http://github.com/micmath/JSDoc" + "url": "git://github.com/micmath/jsdoc.git" + }, + { + "type": "svn", + "url": "https://jsdoc.googlecode.com/svn/trunk" } ], + "bugs": "http://code.google.com/p/jsdoc/issues/list", "contributors" : [ { - "name": "Michael Mathews", - "email": "micmath@gmail.com", - "web": "http://micmath.ws" + "name": "Michael Mathews", + "email": "micmath@gmail.com" } ], "maintainers": [ { - "name": "Michael Mathews", - "email": "micmath@gmail.com", - "web": "http://micmath.ws" + "name": "Michael Mathews", + "email": "micmath@gmail.com" } ] } diff --git a/templates/default/tmpl/container.mustache b/templates/default/tmpl/container.mustache index 670e77e2..b1b7218d 100644 --- a/templates/default/tmpl/container.mustache +++ b/templates/default/tmpl/container.mustache @@ -194,19 +194,19 @@ margin-left: 30px; } .property-head { - margin-left: -30px; + margin-left: -20px; display: block; line-height: 1.2em; } - .property-head h4 { - color: #4782B5; - } - .property-title { + .property-name { float: left; margin: 0; - padding: 0 20px 0 0; - font-style: italic; + padding: 0 10px 0 0; + + font-style: italic; + font-weight: bold; font-size: 1.2em; + color: #4782B5; } .property-summary { color: #999; @@ -219,8 +219,16 @@ .property-details dt { font-weight: bold; margin-bottom: 4px; + padding-left: 10px; + clear: left; + float: left; + } + .property-details dd { + padding-left: 60px; + } + .property-deprecated { + text-decoration: line-through; } - .example-code { border: 1px solid #999; diff --git a/templates/default/tmpl/properties.mustache b/templates/default/tmpl/properties.mustache index 01dd6f2e..e3763428 100644 --- a/templates/default/tmpl/properties.mustache +++ b/templates/default/tmpl/properties.mustache @@ -1,8 +1,8 @@
-
+
-

{{name}}

+ {{name}}
{{{summary}}} @@ -15,9 +15,30 @@
{{{description}}} +
{{/description}} + {{#deprecated}} +
+ Deprecated +
+
+ {{{deprecated}}} +
+
+ {{/deprecated}} + + {{#since}} +
+ Since +
+
+ {{{since}}} +
+
+ {{/since}} + {{#type}}
Type @@ -26,6 +47,7 @@ {{#names}} {{#linkTo}}{{.}}{{/linkTo}}{{^last?}} | {{/last?}}{{#last?}} {{/last?}} {{/names}} +
{{/type}} @@ -35,6 +57,7 @@
Yes +
{{/readonly}} @@ -44,15 +67,17 @@
Yes +
{{/nullable}} {{#defaultvalue}}
- Default Value + Default
{{defaultvalue}} +
{{/defaultvalue}} @@ -61,9 +86,11 @@ Example
+
{{.}}
+
{{/examples}}