documentationjs / documentationjs/documentation

Protected methods of a class are not marked in any way in HTML output

Open
#1,099 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.8k
Forks
481
PR merge metrics
No merged PRs in 30d

Description

The following class has one `public` and one `protected` method. The `protected` one is not marked as protected in any way in the HTML output. When in JSON, it is marked as `protected` however. Is that the expected behaviour? For example, if it is `private` then by default it is not displayed at all. [Here](http://usejsdoc.org/tags-protected.html) it says:

> In the following example, the instance member Thingy#_bar appears in the generated documentation, but with an annotation indicating that it is protected

```
/**
* Class for testing
* @class
*/
class A {
/**
* ABC function
* @param {number} a Param A
* @return {number} A new number
*/
abc(a) {
return a + 1;
}

/**
* ABCD function
* @protected
* @param {number} a Param A
* @return {number} A new number
*/
abcd(a) {
return a + 1;
}
}
```
[output-html.zip](https://github.com/documentationjs/documentation/files/2141964/output-html.zip)
[output.json.zip](https://github.com/documentationjs/documentation/files/2141965/output.json.zip)

* What version of documentation.js are you using?:

v8.0.0, installed via NPM.

* How are you running documentation.js:

via the CLI

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.