Open jfairley opened 9 months ago
The plugin splits up code examples that include a decorator. It seems the jsdoc parser interprets the @ as a jsdoc tag.
@
@example is removed entirely because the parser thinks there is no content
@example
/** * Decorate my injectable service. * * @example * @Inject() * private readonly someService: SomeService; * * @example * @Inject() private readonly someService: SomeService; */ export class SomeService {}
/** * Decorate my injectable service. * * @Inject() private readonly someService: SomeService; * * @Inject() private readonly someService: SomeService; */ export class SomeService {}
I added code comments to prove my hypothesis from example 1 (above).
You can see that the @Inject is extracted and moved down below the @example blocks.
@Inject
/** * Decorate my injectable service. * * @example * // example 1 * @Inject() * private readonly someService: SomeService; * * @example * // example 2 * @Inject() private readonly someService: SomeService; */ export class SomeService {}
/** * Decorate my injectable service. * * @example // example 1 * * @example // example 2 * * @Inject() private readonly someService: SomeService; * * @Inject() private readonly someService: SomeService; */ export class SomeService {}
The plugin splits up code examples that include a decorator. It seems the jsdoc parser interprets the
@
as a jsdoc tag.example 1
@example
is removed entirely because the parser thinks there is no contentbefore
after
example 2
I added code comments to prove my hypothesis from example 1 (above).
You can see that the
@Inject
is extracted and moved down below the@example
blocks.before
after