Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

It appears that newlines are not respected in markdown files in Bitbucket within code blocks

Rick Bross
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 17, 2018

Example:

 

```

line1

line2

line3

```

Renders as 

line1 line2 line3

 

I've tried it with 4 spaces in front of each line, trailing 2 spaces etc.

This simply won't do for Python code.

1 answer

0 votes
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 13, 2018

Hi @Rick Bross,

I've just tried this in both Bitbucket Server (self-hosted using the most recent version) and  the bitbucket.org (hosted by Atlassian) and it works for both platforms.

This is how the lines look like in the two platforms.

 

Bitbucket Server

 

newLinesMd_Server.png

Note that I had to click on the "Show rendered" button to get the lines displayed as above. Without clicking on that button, this is how the file will be presented.

newLinesMd_ServerNoRendered.png

Bitbucket.org

newLinesMd_Cloud.png

 

Does this help?

 

Cheers,

Caterina

Volodymyr Boichentsov
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 20, 2018

I have this problem. 

If I use enumeration, then I need add tab in front of code block.

 

Screen Shot 2018-06-20 at 11.29.35.png

 

And I get:

Screen Shot 2018-06-20 at 11.29.50.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events