Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to add formatted code inside table cell?

I'm trying to add a formatted json object as a code block inside a table cell and BitBucket just won't render the markdown correctly, but my VSCode render looks just fine. What is the proper syntax for BitBucket?


My markdown looks like this:

| Message ID | Description | Format |

|:---:|:--- |:--- |

**4** | Regular data transmission | <pre lang=json>{<br>  "message_id": 4, <br>  "cellular_imei": 123456789012345,<br>  "iridium_imei": 123456789012345,<br>  "device_logged_time": "2020-05-13 06:36:05"<br>  "payload": {<br>    "conductor_current_avg": "",<br>    "conductor_current_rms": "",<br>    "rssi_level": "",<br>    "board_temperature": "",<br>    "x_tilt": "",<br>    "y_tilt": "",<br>    "storage_capacitor_voltage": "",<br>    "rangefinder_height": "",<br>    "conductor_temperature": "",<br>    "ground_temperature": ""<br>  }<br>}</pre> |


Should render as


But is instead rendered as plaintext.

1 answer

@Soumyadeep MandalThanks for the reply. Unfortunately the first link you shared does not have an answer. It appears to be the same issue, but without a clear answer or indication that BitBucket will ever support HTML elements inside code blocks. The second link is a generic documentation of how to use different markdown styles, but again does not answer my question.

The issue here is that BitBucket claims to support the CommonMark Spec found at but they haven't updated their documentation on how to implement escaping HTML elements. Their documentation references using "safe_mode" which was deprecated years ago when they were supporting python 2.x.

The reason I have to use HTML elements inside the code block is to "prettify" the json object for readability. I could alternatively write the entire thing as a single line code block, but that would lose a lot of value in clean documentation.

My markdown renders perfectly in GitHub but fails in BitBucket. At this rate I will be moving all of my versioned code to GitHub and paying for their service instead of supporting BitBucket.

I'd love to be proven wrong on why this doesn't render as it should, but as it stands, BitBucket has failed to deliver.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,826 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you