From 59655252e19df0f64a8753c5742e0e4f083b2763 Mon Sep 17 00:00:00 2001 From: Michael Mathews Date: Tue, 29 May 2012 20:19:07 +0100 Subject: [PATCH] Fix for @returns type and description not appearing in the output. --- templates/haruki/README.md | 1 + templates/haruki/publish.js | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/haruki/README.md b/templates/haruki/README.md index db5ce462..087df6c8 100644 --- a/templates/haruki/README.md +++ b/templates/haruki/README.md @@ -12,6 +12,7 @@ Currently Haruki only supports a subset of the tags supported by the default tem * @function (or @method) * @var (or @member) * @class + * @mixin * @event * @param * @returns diff --git a/templates/haruki/publish.js b/templates/haruki/publish.js index 765b70d9..86eed10b 100644 --- a/templates/haruki/publish.js +++ b/templates/haruki/publish.js @@ -5,7 +5,6 @@ ./jsdoc scratch/jsdoc_test.js -t templates/haruki -d console -q format=xml */ -//var dumper = require('jsdoc/util/dumper'); (function() { /** @@ -45,7 +44,7 @@ }) .forEach(function (element, i) { //console.log((i+1)+': '+element.kind+' '+element.longname+' ('+element.name+')'); - + if (element.kind === 'namespace') { if (! parentNode.namespaces) { parentNode.namespaces = { }; @@ -87,11 +86,11 @@ 'parameters': [ ], 'examples': [] }; - + if (element.returns) { parentNode.functions[element.name].returns = { - 'type': element.returns.type? (element.returns.type.names.length === 1? element.returns.type.names[0] : element.returns.type.names) : '', - 'description': element.returns.description || '' + 'type': element.returns[0].type? (element.returns[0].type.names.length === 1? element.returns[0].type.names[0] : element.returns[0].type.names) : '', + 'description': element.returns[0].description || '' }; }