mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Fix for broken /*!* test. (hat tip tschaub)
This commit is contained in:
parent
de4f31b46e
commit
dbc9c428a6
@ -122,7 +122,7 @@ function pretreat(code) {
|
|||||||
// make lent objectliterals documentable by giving them a dummy name
|
// make lent objectliterals documentable by giving them a dummy name
|
||||||
.replace(/(\/\*\*[\s\S]*?@lends\b[\s\S]*?\*\/\s*)\{/g, '$1____ = {')
|
.replace(/(\/\*\*[\s\S]*?@lends\b[\s\S]*?\*\/\s*)\{/g, '$1____ = {')
|
||||||
// make starbangstar comments look like real jsdoc comments
|
// make starbangstar comments look like real jsdoc comments
|
||||||
.replace(/\/\*\!\*/g, '/***');
|
.replace(/\/\*\!\*/g, '/**');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,7 +1,12 @@
|
|||||||
/**
|
/*!*
|
||||||
* Script that does something awesome
|
* Script that does something awesome
|
||||||
*
|
*
|
||||||
* @copyright (c) 2011 Rotorz Limited. All rights reserved.
|
* @copyright (c) 2011 Rotorz Limited. All rights reserved.
|
||||||
* @author Lea Hayes
|
* @author Lea Hayes
|
||||||
* @module myscript/core
|
* @module myscript/core
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*!*********************************
|
||||||
|
* This should be ignored by JSDoc
|
||||||
|
* @var x
|
||||||
|
*/
|
||||||
@ -1,9 +1,14 @@
|
|||||||
(function() {
|
(function() {
|
||||||
var docSet = testhelpers.getDocSetFromFile('test/cases/starbangstar.js'),
|
var docSet = testhelpers.getDocSetFromFile('test/cases/starbangstar.js'),
|
||||||
mod = docSet.getByLongname('module:myscript/core')[0];
|
mod = docSet.getByLongname('module:myscript/core')[0],
|
||||||
|
x = docSet.getByLongname('module:myscript/core.x')[0];
|
||||||
|
|
||||||
test('When doclet starts wuth /*!* it, it is treated as a JSDoc comment.', function() {
|
test('When doclet starts wuth /*!* it, it is treated as a JSDoc comment.', function() {
|
||||||
assert.equal(mod.description, 'Script that does something awesome');
|
assert.equal(mod.description, 'Script that does something awesome');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('When doclet starts wuth /*!** it, it is not treated as a JSDoc comment.', function() {
|
||||||
|
assert.equal(typeof x, 'undefined');
|
||||||
|
});
|
||||||
|
|
||||||
})();
|
})();
|
||||||
Loading…
x
Reference in New Issue
Block a user