Last active
March 24, 2016 15:24
-
-
Save armcknight/413e3bba1fe0da942761 to your computer and use it in GitHub Desktop.
Shows examples of all the markdown and keywords available for Swift headerdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
General description of the thing being documented. You can use: | |
- markdown-style `backticks` | |
- [urls pointing to pages like this one, that really helped me make this (thanks!)](http://ericasadun.com/2015/06/14/swift-header-documentation-in-xcode-7/) | |
- HTML-style ascii codes (see copyright below) | |
# Headers | |
## work | |
##### too | |
*as do* **all** the ***emphasis*** levels | |
--- | |
*** | |
- - - | |
and horizontal rules | |
and this is how you make a code box | |
and | |
another one | |
* unordered lists | |
* can use | |
* the following delimiters: | |
* \+ | |
* \* | |
* \- | |
1. ordered | |
2. lists | |
3. use | |
4. numbers | |
Top level items: returns, parameters, throws (see example) | |
- returns: description | |
- parameter name: description | |
- throws: list of errors | |
Bolded subheaders: | |
- attention: callout | |
- author: name | |
- authors: names | |
- bug: description | |
- complexity: O(1) | |
- copyright: © year, name | |
- date: the, uh, date | |
- experiment: description | |
- important: important note | |
- invariant: description | |
- note: not-as-important note | |
- postcondition: description | |
- precondition: description | |
- remark: aside | |
- requires: dependencies | |
- seealso: another another method | |
- since: some date | |
- todo: action item | |
- version: version | |
- warning: warning | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment