-
-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] @example : the generated code block of the doc gets unexpected spaces #253
Comments
It's because you are using the ```html tag as you would in markdown. Please supply it like this: /**
* Shows all events on a given day. Example usage:
*
* @example
* <mwl-calendar-day-view
* [viewDate]="viewDate"
* [events]="events">
* </mwl-calendar-day-view>
*/ |
@rdkmaster Where did you place the @example comment? It should be at root level for example: /**
* The datagrid component for displaying lists of data.
*
* @example
* <sr-datagrid
* [datagridFormat]="datagridFormat"
* [loading]="loading"
* [(rows)]="rows">
* <sr-datagrid-search
* (onSearch)="onSearch($event)"></sr-datagrid-search>
* <sr-datagrid-button
* [textTranslationKey]="'GRID.ADD_USER'"
* (onClick)="onClick($event)"></sr-datagrid-button>
* <sr-datagrid-toggle
* (onSwitch)="onSwitch($event)"></sr-datagrid-toggle>
* </sr-datagrid>
*/
@Component({
selector: 'sr-datagrid',
templateUrl: './datagrid.component.html',
styleUrls: []
})
export class DatagridComponent implements OnInit {} |
I copied the example from here, and here is my code
|
@rdkmaster That's not on the root level. You are giving an example to a function called test. Look at my example 😄 |
what do you mean by root level? Are u saying that the I have rolled back my code, and I can't try it now, maybe I'll try this sometime later. |
@rdkmaster Outer class level indeed. |
ok thanks, outter of the class seems to be quite a limit. Is there any way to use the markdown style code block and avoid the unexpected spaces? |
I confirm this is not normal to doesn't support @example for inner function or properties of class. |
@vogloblinsky Sorry, Didn't know this was actually not expected behaviour |
@Kapulara |
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context. |
Overview of the issue
the generated code block of the doc gets unexpected spaces, see the image below
Operating System, Node.js, npm, compodoc version(s)
win10 64, node6.10, npm 3.10
Angular configuration, a
package.json
file in the root folderyes
Compodoc installed globally or locally ?
locally
Motivation for or Use Case
the generated code block of the doc gets unexpected spaces
Reproduce the error
use the comment:
Related issues
no
additional info
The text was updated successfully, but these errors were encountered: