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

How can I have Markdown code syntax highlighting?

Achilleas Papakonstantinou March 21, 2018

In my repository I have a README.md. I have formatted my code blocks with:

 

```javascript

console.log("Hello world!");

```

I don't see any coloring or the rectangle surrounding the code. Just the monospace font.

 

How can I have code syntax highlighting?

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2018

 

Hi Achilleas! Are you using Bitbucket Server or Cloud?

I have tested that code you pasted here in my Bitbucket Cloud account, and it renders correctly, the text is surrounded in a grey box. Make sure you've selected JavaScript in the dropwdown.

If you're using Server, you can check this solution at Code blocks does not syntax highlight.

If you're still having issues, can you send us a screenshot?

Best regards,

Ana

Achilleas Papakonstantinou March 28, 2018

I have the following README.md displaying at the root directory of my project. I don't know if it's Bitbucket Server or Cloud, just the basic one.

I have marked with yellow color the javascript code which is just monospace font and no further syntax highlight.

readme.md issue.png

Like razvan likes this
razvan March 15, 2020

After couple of years, I hit the same problem.

There's no background / padding / text color, only font-family is changed

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events