documentation icon indicating copy to clipboard operation
documentation copied to clipboard

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

Open ipeychev opened this issue 6 years ago • 2 comments

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 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 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

ipeychev avatar Jun 27 '18 16:06 ipeychev

Same problem here. Private and protected members are not marked in any way.

adroste avatar Jul 24 '18 21:07 adroste

Anyone want to help? The relevant change would be in the default theme: https://github.com/documentationjs/documentation/tree/master/src/default_theme

tmcw avatar Jul 24 '18 22:07 tmcw