typedoc-plugin-markdown
typedoc-plugin-markdown copied to clipboard
[typedoc-plugin-markdown] `@example` block not rendered with Headline
I just got started using the typedoc-plugin-markdown plugin (and typedoc in general). First of all: this is an awesome project, thank you so much for investing your time in helping other generate great docs out of JSDoc.
While using this plugin, I noticed that @example blocks are rendered in a weird way, where "Example" is not a headline, but rendered as bold code:
Input
/**
* A function that does something.
*
* @example
* This is an example
*
* ```ts
* const foo = 'bar';
*
* @param name - Your name
* @returns Whether the name is not null
*/
export function myFunction(name: string) {
return name != null;
}
### myFunction
▸ **myFunction**(`name`): `boolean`
A function that does something.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | Your name |
#### Returns
`boolean`
Whether the name is not null
**`Example`**
This is an example
```ts
const foo = 'bar';
```
#### Defined in
...
In my opinion, it should be rendered as #### Example, just like the other headlines.
Is there a way to customize this behavior, or is this a bug?
Thanks. Yes completely agree and this is indeed the behaviour in typedoc-plugin-markdown@next, however this probably won't make it into v3.