diff --git a/modules/jsdoc/doclet.js b/modules/jsdoc/doclet.js index 74d47ebe..5274d482 100644 --- a/modules/jsdoc/doclet.js +++ b/modules/jsdoc/doclet.js @@ -271,8 +271,7 @@ } if (tagAbout.setsDocletDesc) { - tags[tags.length] = parse_tag.fromText('desc '+tags[i].desc); - print('>>> tag desc is '+tags[i].toSource()); + tags[tags.length] = parse_tag.fromText('desc '+tags[i].value); } if (tags[i].name === 'name') { diff --git a/modules/jsdoc/name.js b/modules/jsdoc/name.js index c8e4886d..893418e0 100644 --- a/modules/jsdoc/name.js +++ b/modules/jsdoc/name.js @@ -86,9 +86,9 @@ var atoms = [], cursor = 0; path = path.replace(/(".+?")/g, function($) { - $ = $.slice(1, -1); + //$ = $.slice(1, -1); // trim quotes? - var token = '@' + atoms.length + '@'; + var token = '@{' + atoms.length + '}@'; atoms.push($); return token; }); @@ -98,16 +98,12 @@ splitAt = path.lastIndexOf(splitOn), prefix = (splitOn && splitAt !== -1)? path.slice(0, splitAt) : ''; - if (splitOn === '#' || splitOn === '~') { prefix = prefix + splitOn; } + if ('#~'.indexOf(splitOn) > -1) { prefix = prefix + splitOn; } // restore quoted strings back again for (var i = 0, leni = atoms.length; i < leni; i++) { - prefix = prefix.replace('@'+i+'@', atoms[i]); - shortname = shortname.replace('@'+i+'@', atoms[i]); - - // remove quotes from shortnames - ///^"(.+)"$/.test(shortname); - //if (RegExp.$1) { shortname = RegExp.$1; } + prefix = prefix.replace('@{'+i+'}@', atoms[i]); + shortname = shortname.replace('@{'+i+'}@', atoms[i]); } return [prefix, shortname]; diff --git a/modules/jsdoc/tagdictionary.js b/modules/jsdoc/tagdictionary.js index c6a74e54..e912fb7c 100644 --- a/modules/jsdoc/tagdictionary.js +++ b/modules/jsdoc/tagdictionary.js @@ -344,4 +344,20 @@ new TagDefinition('version', { isExported: true }); + + /** Syntax: @category + @property {TagDefinition} category + @memberOf module:jsdoc/tagdictionary.tagDefinitions + */ + new TagDefinition('category', { + isExported: true + }); + + /** Syntax: @deprecated + @property {TagDefinition} deprecated + @memberOf module:jsdoc/tagdictionary.tagDefinitions + */ + new TagDefinition('deprecated', { + isExported: true + }); })(); \ No newline at end of file diff --git a/test/samples/jsdoc_quotename.js b/test/samples/jsdoc_quotename.js new file mode 100644 index 00000000..945357dd --- /dev/null +++ b/test/samples/jsdoc_quotename.js @@ -0,0 +1,17 @@ +/** + @namespace + @name chat."#channel" + */ +chat["#channel"] = {}; + + +/** + @property + @type {boolean} + @name chat."#channel".open + */ +chat["#channel"].open = true; + +/** + @event chat."#channel"."op:announce-motd" + */ \ No newline at end of file diff --git a/test/samples/jsdoc_test.js b/test/samples/jsdoc_test.js index 7edb701b..b495d311 100644 --- a/test/samples/jsdoc_test.js +++ b/test/samples/jsdoc_test.js @@ -38,7 +38,7 @@ function Shape(){ /** * This is an inner method, just used here as an example * @private - * @method Shape-addReference + * @method Shape~addReference * @since version 0.5 * @author Sue Smart */ diff --git a/test/tests/08_tag_name.js b/test/tests/08_tag_name.js index 540b8d4b..7619e72c 100644 --- a/test/tests/08_tag_name.js +++ b/test/tests/08_tag_name.js @@ -34,7 +34,7 @@ it('should have an `name` property set to the last entire quoted segment of that string', function() { var doclet = doclets[2].toObject(); expect(doclet).to(have_property, 'name'); - expect(doclet.name).to(eql, 'and.don\'t.forget#Po!'); + expect(doclet.name).to(eql, '"and.don\'t.forget#Po!"'); }); });