Skip to content

Give title for each example #861

Description

@razhayat

What package is the feature request related to?

typedoc-plugin-markdown

Background

I have multiple @example blocks for each type I've created. Each one has its own title using <caption>[title]</caption>. But when I generate the markdown, I see that the titles get ignored

 * @example <caption>title for example</caption>
 * type Result = ValueOf<{ a: string; b: number }>;
 * //   ^?
 * // string | number
 *
 * @example <caption>title 2</caption>
 * type Result = ValueOf<{ a: string; b: number; c: boolean }, "a" | "c">;
 * //   ^?
 * // string | boolean
 *

Proposed solution

This should be the result

Examples

title for example

type Result = ValueOf<{ a: string; b: number }>;
//   ^?
// string | number

title 2

type Result = ValueOf<{ a: string; b: number; c: boolean }, "a" | "c">;
//   ^?
// string | boolean

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions