nixdoc icon indicating copy to clipboard operation
nixdoc copied to clipboard

Example syntax in comments

Open tazjin opened this issue 7 years ago • 0 comments

In @grahamc's manually written doc comments, multiple (named) examples are supported. It would be great to be able to specify examples in the comments, too.

Currently these syntaxes are recognised:

Example: <some example code>

# or alternatively
Example:
    <some example code>

I propose keeping those working, and adding an additional syntax for named examples:

Example: This shows how to do X
    <code to do X>

tazjin avatar Oct 26 '18 09:10 tazjin