You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Furthermore, even though the block-property.hbs template has an "Example" section, this is not rendered.
Here's the local example I used to duplicate the issues.
Code:
Rendered docs:
First, the function, which does it correctly by omitting the @example content from the description and only includes it under the "Example:" header:
And now the rendered docs for the class property and method. As per the .hbs file for class properties, there should be an "Example" header but there is not, and the example for the class method is clearly seen twice.
Compodoc version
Latest( @compodoc/compodoc 1.1.21 )
Angular configuration, a package.json file in the root folder
Default fresh setup for the latest Angular and Compodoc
The duplicate in the example project is a typo. I will push the fix.
For the main bug, yes there is duplicate feature of displaying example code.
For simple code and internal process, i think removing the Example part and move it inside the method or property description part.
Overview of the issue
When I use the
@example
jsdoc tag in the comment for a class method, the example is rendered twice.This bug is present in the official Compodoc live example:
https://compodoc.github.io/compodoc-demo-todomvc-angular/injectables/TodoStore.html#setAllTo
Furthermore, even though the
block-property.hbs
template has an "Example" section, this is not rendered.Here's the local example I used to duplicate the issues.
Code:

Rendered docs:

First, the function, which does it correctly by omitting the @example content from the description and only includes it under the "Example:" header:
And now the rendered docs for the class property and method. As per the .hbs file for class properties, there should be an "Example" header but there is not, and the example for the class method is clearly seen twice.

Compodoc version
Latest( @compodoc/compodoc 1.1.21 )
Angular configuration, a
package.json
file in the root folderDefault fresh setup for the latest Angular and Compodoc
Compodoc installed globally or locally ?
locally
The text was updated successfully, but these errors were encountered: