Search code examples
githubmarkdownbitbucket

Bitbucket markdown is not displayed correctly


I have a CHANGELOG.md with the following content:

## 🐛 Bug Fixes
- `commithash` enable main automatic pipeline  
  - Author: committer
  - Date: 01/08/2024 20:15:08

The markdown renders good in github and preview of visual studio code / other tools, the result should be:

correct result

But instead in bitbucket you get this result:

wrong result

How come? I tried to make it look correct adding more spaces like this (4 spaces in total):

## 🐛 Bug Fixes
- `commithash` enable main automatic pipeline
    - Author: committer
    - Date: 01/08/2024 20:15:08

and it renders like so in bitbucket (why is it not working with 2 spaces like in github and IDEs? Think there is something wrong with markdown in bitbucket):

closer to the correct result but using more spaces than normal

Even if I paste the markdown here in StackOverflow (with only 2 spaces) the result is as expected:

🐛 Bug Fixes

  • commithash enable main automatic pipeline
    • Author: committer
    • Date: 01/08/2024 20:15:08

Solution

  • This just appears to be a nuance of the particular Markdown implementation in use at Bitbucket.

    From the official tutorial

    Lists can be embedded in lists. List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab

    See also the Markdown Syntax Guide