diff --git a/modules/jsdoc/tag/dictionary/definitions.js b/modules/jsdoc/tag/dictionary/definitions.js index 229c0eee..a1ced903 100644 --- a/modules/jsdoc/tag/dictionary/definitions.js +++ b/modules/jsdoc/tag/dictionary/definitions.js @@ -31,6 +31,16 @@ } }); + dictionary.defineTag('augments', { + mustHaveValue: true, + onTagged: function(doclet, tag) { + doclet.augment(tag.value); + + return false; + } + }) + .synonym('extends'); + dictionary.defineTag('borrows', { mustHaveValue: true, onTagged: function(doclet, tag) { @@ -42,15 +52,14 @@ .synonym('extends') .synonym('mixes'); - dictionary.defineTag('augments', { - mustHaveValue: true, + dictionary.defineTag('copyright', { + musHaveValue: true, onTagged: function(doclet, tag) { - doclet.augment(tag.value); + doclet.copyright = tag.value; - return false; + return true; } - }) - .synonym('extends'); + }); dictionary.defineTag('class', { onTagged: function(doclet, tag) { // @class implies @constructor diff --git a/test/cases/copyrighttag.js b/test/cases/copyrighttag.js new file mode 100644 index 00000000..68a09f34 --- /dev/null +++ b/test/cases/copyrighttag.js @@ -0,0 +1,6 @@ +/** @constructor + @copyright (c) 2011 Michael Mathews +*/ +function Thingy() { + +} \ No newline at end of file diff --git a/test/runner.js b/test/runner.js index 10955831..c8631ab6 100644 --- a/test/runner.js +++ b/test/runner.js @@ -91,6 +91,7 @@ testFile('test/t/cases/alias2.js'); testFile('test/t/cases/accesstag.js'); testFile('test/t/cases/authortag.js'); +testFile('test/t/cases/copyrighttag.js'); testFile('test/t/cases/globaltag.js'); report(); diff --git a/test/t/cases/copyrighttag.js b/test/t/cases/copyrighttag.js new file mode 100644 index 00000000..76a144c4 --- /dev/null +++ b/test/t/cases/copyrighttag.js @@ -0,0 +1,11 @@ +(function() { + var docSet = testhelpers.getDocSetFromFile('test/cases/copyrighttag.js'), + Thingy = docSet.getByLongname('Thingy')[0]; + + //dump(docSet.doclets); + + test('When a symbol has a @copyright tag, the doclet has a copyright property with that value.', function() { + assert.equal(Thingy.copyright, '(c) 2011 Michael Mathews'); + }); + +})(); \ No newline at end of file