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 line breaks in code blocks Edited

Max Malhotra Mar 22, 2018


I do know that in Mark Down (md) bitbucket allows for line breaks by adding two spaces at the end of a line. However, this does not work inside code blocks. 

I simply want to have a list of items I copied from notepad++ that are in a vertical list to show up the same way INSIDE a code block WHEN the code blocked is indented 4 spaces. 

Note: To be very specific the code block does wrap if I do not indent the code block 4 spaces, however, I do need to indent the code block 4 spaces so that my line numbering can continue from the previous number after the code block.  (I have tried indenting the list items an additional 4 spaces to no avail as well as trying to put two spaces at the end of the code block). 



So I need to know either how to wrap items inside a code block when the code block is indented OR I need to know how to continue line numbering without indenting the code block. 


Thanks in advance.


1 answer

0 votes
Max Malhotra Mar 23, 2018

What I had originally asked still has not been answered/resolved. 

My Work Around: 

Cons: This solution puts a line number in front of the code block. Which I would have preferred not to be there. Additionally, the implementation of this workaround is a bit convoluted. 

Actions Required: 

    Add a Numeric list. 

    When you want to include a code block, press the Enter Key twice (making sure there is one space between your previous number and the new number. 

    Type out the new number such as 18. Then make sure you have one space after the period.

    Then press the Enter key once. 

    Add 4 spaces to the beginning of the line that you are presently on. 

    Type/Paste your code and this will show up in the code block.  (Now your code block will be wrapped correctly) 

    Continue numbering as normal.  


Desired Approach: 

I would like the ability to programmatically assign any number to the numbered list.  

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,790 views 1 18
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