Pregunta

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.

¿Fue útil?

Solución

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.

Otros consejos

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

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

line1
##<2 white spaces><enter>
line2

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

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...

Just use a single hyphen "-":

Example:
First line
-
Second line

Result:
First line

Second line
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top