mirror of
https://github.com/photonstorm/phaser
synced 2024-11-15 17:28:18 +00:00
jsdoc - namealias fix
Fixed issue with namealias and class doclects without names.
This commit is contained in:
parent
c8b0052743
commit
bf16b97bdf
1 changed files with 6 additions and 4 deletions
|
@ -17,11 +17,13 @@ exports.handlers.jsdocCommentFound = function (e) {
|
|||
|
||||
var raw = e.comment;
|
||||
|
||||
if (/^(\s*[*])\s*@class\b/m.exec(raw))
|
||||
var m = /^(\s*[*])\s*@class\b/m.exec(raw);
|
||||
if (m)
|
||||
{
|
||||
// @class X / @constructor -> @alias X / @class
|
||||
raw = raw.replace(/^(\s*[*])\s*@class\s+(\S+).*?$/mg, "$1 @alias $2\n$1 @class");
|
||||
raw = raw.replace(/^(\s*[*])\s*@constructor\b.*?$/mg, "$1");
|
||||
// @class X -> @alias X / @class
|
||||
raw = raw.replace(/^(\s*[*])\s*@class[ \t]+(\S+).*?((?=[\r\n]+))/mg, "$1 @alias $2$3$1 @class");
|
||||
// @constructor -> {removed}
|
||||
raw = raw.replace(/^(\s*[*])\s*@constructor\b.*?(?=[\r\n]+)/mg, "$1");
|
||||
|
||||
e.comment = raw;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue