typedoc2md / typedoc-plugin-markdown

A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.
https://typedoc-plugin-markdown.org
MIT License
691 stars 171 forks source link

[typedoc-plugin-markdown] `@example` block not rendered with Headline #501

Closed homj closed 2 months ago

homj commented 8 months ago

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 ```ts /** * 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?
tgreyuk commented 7 months ago

Thanks. Yes completely agree and this is indeed the behaviour in typedoc-plugin-markdown@next, however this probably won't make it into v3.

tgreyuk commented 2 months ago

typedoc-plugin-markdown@4.0.0