Wikunia / brackets-FuncDocr

FuncDocr generates JS/PHPDoc annotations for your functions
101 stars 14 forks source link

Functions get squished if there are multiline comments in between. #47

Closed Hirse closed 9 years ago

Hirse commented 9 years ago

I have copied some function from another (poorly documented) source and had code that looked like this:

/**
 * This is function a
 * @param   {Number}  b this is b
 * @returns {Boolean} always false
 */
var a = function (b) {
    return false;
};

/*
 * Any Block comment
 */
var c = function (d) {
    return false;
};

When I now use the Ctrl+Alt+D hotkey to add / reformat the JsDoc for function c, the first function and the multiline comment are simply deleted and the extension behaves like the first JsDoc belongs to the second function:

/**
 * This is function a
 * @param   {[[Type]]} d [[Description]]
 * @returns {Boolean}  always false
 */
var c = function (d) {
    return false;
};
Wikunia commented 9 years ago

Ah it's because the second docblock starts with /* instead of /**. Thanks for the issue I will have a deeper look!

Wikunia commented 9 years ago

A deep look later :D Can you install from URL please and test this version. Hope there are no bugs now!

Hirse commented 9 years ago

Yes, works fine. Thanks for the quick fix.

Wikunia commented 9 years ago

Well thanks for the issue :)