feat: add support of @example name#329
Conversation
Parse <caption>$name</caption> for @example tag as specified in jsdoc
|
doc_components currently gets the name from the first part (everything before the first empty line or before a code block) of the doc content of the example tag. I don't understand why this is necessary |
|
Which doc_component do you refers ? The first goal is to patch the name in example as required by jsdoc spec and then align to other tools (like jedoc code hint in vscode). As describe in PR (and spec) it gives context to example before trying to read it in detail. The second part is to fix the issues in deno doc api consumers, for instance module doc on deno.land get blank example name when using jsdoc synthax for example naming. To align with others tools and don't throw a spec option I fixed this lack of implementation. Then I will, if PR is accepted, fix doc render on deno.land or if not, add an issue to compensate the api output. |
Support name of example if specified.
Parse $name for @example tag as specified in jsdoc.
A future work is pr approved is to provide names for examples in module doc on deno.land instead of "Example 1", "Example 2"
example:
will now output doc