From bbaf9a287022a9aa6675e4aab9894fe5bd041ad7 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Wed, 16 May 2012 22:20:35 -0700 Subject: fix(docs): accept return in addition to returns documentation used @return but parser expected @returns, which made the generated documentation incomplete. --- docs/src/ngdoc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/src/ngdoc.js') diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js index def665fa..6576e619 100644 --- a/docs/src/ngdoc.js +++ b/docs/src/ngdoc.js @@ -227,10 +227,10 @@ Doc.prototype = { 'default':match[6] }; self.param.push(param); - } else if (atName == 'returns') { + } else if (atName == 'returns' || atName == 'return') { match = text.match(/^\{([^}=]+)\}\s+(.*)/); if (!match) { - throw new Error("Not a valid 'returns' format: " + text); + throw new Error("Not a valid 'returns' format: " + text + ' in ' + self.file + ':' + self.line); } self.returns = { type: match[1], -- cgit v1.2.3