Markdown

It is possible to use Markdown within Swarm to add text styles to comments and project overview pages. It is not supported in reviews.

Markdown in comments

Image of an Example Comment with Markdown

The supported set of Markdown styles in review comments is limited to inline styles, so headers and other structural syntax are ignored.

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 \!
Image Showing All Supported Markdown Styles

Markdown in projects

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.

Note

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.

Project overview tab image

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.