Skip to content
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

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

Closed
homj opened this issue Nov 16, 2023 · 2 comments
Closed

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

homj opened this issue Nov 16, 2023 · 2 comments

Comments

@homj
Copy link

homj commented Nov 16, 2023

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?

@tgreyuk
Copy link
Member

tgreyuk commented Nov 19, 2023

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 tgreyuk added the next Fix available in the '@next' release label Nov 19, 2023
@tgreyuk
Copy link
Member

tgreyuk commented May 3, 2024

typedoc-plugin-markdown@4.0.0

@tgreyuk tgreyuk closed this as completed May 3, 2024
@tgreyuk tgreyuk removed the next Fix available in the '@next' release label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants