Highlight syntax and mark up issues

Syntax highlighting and markup in the issue tracker is Markdown syntax just as it is with comments in Bitbucket.

Markdown Cheat Sheet

The tables below contain examples of the most common Markdown syntax.  You can use the format bar in a comment to format text or you can type Markdown directly.To play with the syntax, go ahead and copy one of the examples below and paste it into a Bitbucket comment or issue. For a full list of all the Markdown syntax, go to John Gruber's Daring Fireball site get a complete list of Markdown syntax.

Headings Paragraphs
# Heading 1
## Heading 2
### Heading 3
### Heading 4
#### Heading 5
#### Heading 6
Each sentence is on its own line the press return for a newline line.

To break a line, type two spaces after the line ends and then press the new line. 

For example,  
this is one
Character Styles Unordered List Ordered List List in List Quotes or Citations
*Italic characters* 
_Italic characters_
**bold characters**
__bold characters__
* Item 1
* Item 2
* Item 3
  * Item 2a
  * Item 2b
  * Item 3c
1. Step 1
2. Step 2
3. Step 3
  a. Step 2a
  b. Step 2b
  c. Step 2c
1. Step 1
2. Step 2
3. Step 3
  * Item 2a
  * Item 2b
  * Item 3c

Introducing my quote:
 
> Neque porro quisquam est qui 
> dolorem ipsum quia dolor sit amet, 
> consectetur, adipisci velit...
 

Make sure you indent sub-lists 4 spaces.

 
Code Characters Links to External Websites Link to a Wiki Page
Use the backtick to refer to a `function()`.
 
There is a literal ``backtick (`)`` here.
This is [an example](http://www.slate.com/ "Title") inline link.

[This link](http://example.net/) has no title attribute.

[Home](Home)

Referencing Bitbucket Objects in Issues

You can also refer to a Bitbucket issues, requests, and users directly from a comment or issue or commit message.  When you create a reference, saving the comment (or issue) causes Bitbucket to automatically link to that object.  For items that relate to a repo, such as issues, pull requests, and commits, markdown references to Bitbucket objects always refer to the current repository.  You can also mention an individual or team account — even insert an emoji.

Linking to objects for comments and issues within a repository
Object Syntax Example
pull request
pull request #PR_NUMBER
pull request #29
issues
issue #ISSUE_NUMBER
issue #3

commit

7-40 chars

HEX_CHARS
bb21047
Linking to non-repository objects
Object Syntax Example
user (account)
@USERNAME
@tutorials

Emoji

David Coffey created a list of available emoji.  

:EMOJI:
:mask:


Finally, if you have created a link to JIRA or another service such as Jenkins, you can enter references for those "linkers" too.  For information on creating and using linkers, see Link to a web service.

Was this helpful?

Thanks for your feedback!

5 Archived comments

  1. User avatar

    Anonymous

    Hi, how do I force the Markdown syntax highlighting in READMEs to not guess the language. I find this feature very, very frustrating, and there is very minimal documentation on how to do so.

    12 Jul 2013
    1. User avatar

      manthony

      You need to use a recognized file extension.  See this section in the README page.

      15 Jul 2013
      1. User avatar

        Anonymous

        I don't think that is what the OP meant. I think he/she meant this. Just add :::text to the start of your code block in order to make it plain text.

        27 Jul 2013
        1. User avatar

          manthony

          Yep, you are correct. Thanks for the catch.

          29 Jul 2013
  2. User avatar

    Ændrew Rininsland

    It's super unfortunate BitBucket doesn't support a greater subset of Markdown. Particularly heinous is the omission of strike, which makes managing big unordered lists of bugs kinda difficult. There are at least three separate issues about this, see: https://bitbucket.org/site/master/issue/4412/support-strikethrough-in-markdown-readme and https://bitbucket.org/site/master/issue/5681/markdown-support-for-a-small-subset-of and https://bitbucket.org/site/master/issue/6930/support-some-or-all-html-in-markdown-bb

    22 Oct 2013
Powered by Confluence and Scroll Viewport