143

Is it possible to write a new line (NOT a paragraph) in the Bitbucket markdown?

Two new lines in the source creates one new paragraph. I only want a new line. And I don't want to use a code block.

6 Answers 6

264

It's possible, as addressed in Issue #7396:

When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return or Enter.

5
  • 4
    While it works, please chime in at the link below or anywhere else so they change the format to something more common. bitbucket.org/site/master/issues/7396/…
    – mikijov
    Dec 7, 2015 at 5:10
  • 31
    This is troublesome when the editor auto-remove trailing spaces. Nov 19, 2016 at 20:32
  • 2
    there are problem with phpstorm when want to git commit. that remove space from end of line some time! Apr 23, 2017 at 6:26
  • 1
    I wish they'd also implement the backslash solution.
    – x-yuri
    Jun 8, 2020 at 10:59
  • Write <br/> explicitly. Dec 19, 2022 at 22:37
90

It's now possible to add a forced line break
with two blank spaces at the end of the line:

line1→→
line2

will be formatted as:

line1
line2

5
  • 3
    in case you're not seeing the special characters on your browser/platform: → is an arrow and should represent a blank space
    – auco
    Jun 25, 2016 at 19:53
  • 1
    This likely works in other markdown documents as well
    – Hamy
    Feb 25, 2017 at 13:21
  • 3
    I'd never do this because all text files should have stripped whitespace everywhere (except the trailing newline). Using meaningful space in this way is too implicit.
    – AndiDog
    Sep 4, 2017 at 20:24
  • @AndiDog still better than a <br/>
    – auco
    Sep 4, 2017 at 21:19
  • @auco Can you elaborate on why this is the case? Mar 2, 2022 at 1:56
4

I was facing the same issue in bitbucket, and this worked for me:

line1
##<2 white spaces><enter>
line2
1
  • this places an extra blank link between line1 and line2 in bitbucket readme.md files
    – simpleuser
    Jul 17, 2019 at 21:34
1

On Github, <p> and <br/>solves the problem.

<p>I want to this to appear in a new line. Introduces extra line above

or

<br/> another way

2
  • 1
    Not relevant to the question, which is asking about BitBucket May 28, 2020 at 21:48
  • This does not work in BitBucket. Note that BitBucket is a really lackluster platform, so assuming GitHub/Lab features are present in BitBucket is almost always wrong. For example, for a very long time (easily 10 years) BitBucket didn't even have syntax colouring in side-by-side view (but did in combined view). This was only added very recently (after your answer was posted). Mar 2, 2022 at 1:59
0

Feb 3rd 2020:

  • Atlassian Bitbucket v5.8.3 local installation.
  • I wanted to add a new line around an horizontal line. --- did produce the line, but I could not get new lines to work with suggestions above.
  • note: I did not want to use the [space][space] suggestion, since my editor removes trailing spaces on save, and I like this feature on.

I ended up doing this:

TEXT...
<br><hr><br>
TEXT...

Resulting in:

TEXT...
<AN EMPTY LINE>
----------------- AN HORIZONTAL LINE ----------------
<AN EMPTY LINE>
TEXT...
2
  • "March 2nd 2020" Are you from the future or am I in the past?
    – user11909
    Feb 3, 2020 at 14:16
  • oups, reversed the 2 and the 3. US: month/day/year, Canada: day/monty/year. Correction done.
    – Nic3500
    Feb 3, 2020 at 14:19
0

Just use a single hyphen "-":

Example:
First line
-
Second line

Result:
First line

Second line
1
  • This creates bullet points for me, even when nothing is next to the hyphen. Mar 2, 2022 at 2:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.