I believe it is simply how the rich text editor (TinyMCE) works.
Pressing return on the rich text editor (without soft breaks enabled in the markdown options) creates separate <p>
elements for each line whereas if you press shift+return you get a single <p>
element with the lines separated by <br>
.
e.g.
<div id="rendered-md">
<p data-source-line="1">lines</p>
<p data-source-line="3">lines</p>
<p data-source-line="5">lines</p>
<p data-source-line="7">line<br>line<br>line</p>
</div>
If you were to look at the markdown directly you will have:
lines<cr><lf>
<cr><lf>
lines<cr><lf>
<cr><lf>
lines<cr><lf>
<cr><lf>
lines<cr><lf>
lines<cr><lf>
lines<cr><lf>
The default behaviour of markdown is with "soft breaks" where the last three lines don't have the <cr><lf>
converted to a <br>
but Joplin defailt to "hard breaks".
See - Markdown Guide | Joplin
So basically, pressing "return" on the rich text editor always inserts a full "hard break" rather than "two lines" where shift+return will enter a "soft break" which is rendered differently depending on the markdown>soft breaks
option.