mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
correctly handle symbols named prototype (#891)
This commit is contained in:
parent
17c58d76e5
commit
8ad4b49b3f
@ -74,6 +74,11 @@ function nameIsLongname(name, memberof) {
|
||||
}
|
||||
|
||||
function prototypeToPunc(name) {
|
||||
// don't mangle symbols named "prototype"
|
||||
if (name === 'prototype') {
|
||||
return name;
|
||||
}
|
||||
|
||||
return name.replace(/(?:^|\.)prototype\.?/g, SCOPE.PUNC.INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
@ -20,13 +20,11 @@ describe('documenting symbols with special names', function() {
|
||||
expect(hasOwnProp).toBeDefined();
|
||||
});
|
||||
|
||||
// currently broken: https://github.com/jsdoc3/jsdoc/issues/891
|
||||
xit('When a symbol is named "prototype", the symbol should appear in the docs.', function() {
|
||||
it('When a symbol is named "prototype", the symbol should appear in the docs.', function() {
|
||||
expect(proto).toBeDefined();
|
||||
});
|
||||
|
||||
// currently broken: https://github.com/jsdoc3/jsdoc/issues/891
|
||||
xit('When a symbol is named "prototype", its members are resolved correctly.', function() {
|
||||
it('When a symbol is named "prototype", its members are resolved correctly.', function() {
|
||||
expect(protoValueOf).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user