Merge pull request #117 from whopper/PDOC-130/readme-long-docstrings

(PDOC-130) Add example to README about multi-line tag descriptions
This commit is contained in:
Jesse Scott 2016-10-26 14:08:22 -07:00 committed by GitHub
commit fb10fdcd50
1 changed files with 14 additions and 0 deletions

View File

@ -351,6 +351,20 @@ The string following the `@example` tag is an optional title which is displayed
The example body must begin on a newline underneath the tag, and each line of the example itself must be indented by The example body must begin on a newline underneath the tag, and each line of the example itself must be indented by
at least one space. Further indentation is preserved as preformatted text in the generated documentation. at least one space. Further indentation is preserved as preformatted text in the generated documentation.
#### Multi-Line Tag Descriptions
Similar to multi-line examples, tag descriptions can be spread across multiple lines as long as subsequent lines
are each uniformly indented by at least one space.
```puppet
# @param name The name which the function will use to say hello. Note that this
# description is extra long, so we've broken it up onto newlines for the sake
# of readability.
function example(string $name) {
"hello $name"
}
```
Additional Resources Additional Resources
-------------------- --------------------