It is possible to use Markdown within Swarm to add text styles to comments and project overview pages. It is not supported in reviews.
The supported set of Markdown styles in review comments is limited to inline styles, so headers and other structural syntax are ignored.
**bold**
or *italics*
.Unordered lists can be specified with asterisk (*
) markers. Plus (+
) and minus (-
) signs also work:
* This
* That
* Another
Ordered lists can be specified with numbered markers:
1. First 2. Second 3. Third
You can also mark blocks of code using three backticks on a line, like:
``` var text = "Some code text"; alert(text); ```
Markdown is only supported in comments, not in the review description.
The following example shows all of the above syntax in a single example, with both the source and the final result.
*Comments* can include **Markdown** text, which allows basic styles to be applied to the text.
You can have unordered lists, like this:
* A line
* Another line
* A sub list
* Again
* Back again
Or ordered lists:
1. First
2. Second
3. Third
It is possible to mark text as `code { like: this }` or to define a block of text as code:
```
var i = 1;
var j = 10;
for (i = 1; j != i; i++) {
print i * j;
}
```
You can also [create hyper links](http://www.perforce.com) which point to other places. Use the backslash character \ to escape Markdown syntax characters. You can escape the following characters: Asterisk \* Underscore \_ Curly braces \{ \} Square brackets \[ \] Brackets \( \) Hash \# Plus \+ Minus \- Period \. Exclamation point \!
Project pages can have a README.md
file in the root of their MAIN
branch, which if present will be displayed on the project's overview page.
If you need to change which branch is considered MAIN, and therefore from where the README.md
is read from, see Mainline branch identification.
By default, Markdown content is displayed but is limited to prevent the execution of raw HTML and JavaScript content. Markdown support can be configured to disabled
or unrestricted
mode, see Project readme for details.
As well as the Markdown syntax that is supported in comments and described above, the README pages support a more extensive range of syntax, the most notable of which are described below. For a more thorough list of syntax, see the Markdown cheatsheet.
Headers can be defined using hash (#) marks.
# Main heading
## Sub heading
### Lesser heading
Images can be added as well. You can either provide the full URL, or use a relative URL to reference something in Swarm.


Tables are supported by using pipe (|) separators between columns and colons (:) for justification.
| Tables | Look | Like this |
| -------- | ----- | --------- |
| Left | right: | :center: |
It is also possible to blockquote paragraphs using the greater than symbol (>).
> Blockquotes can be displayed like this, using the
> the greater than sign at the start of the line.
Normal text resumes here.