RFE: Add soft break ON/OFF to General Settings

Joplin does not adhere to traditional, commonmark, or even github markdown standards when it comes to how it treats a line ending.

When you use a markdown editor, you are creating in a text editor, not a WYSWYG word processor. It’s markup text. You don’t really know what the end result will be, and the rendering is dynamic anyway. There is a reason a new line is there to make the text more readable, not the rendering. The rendering needs to be algorithmic. Thus, markup text works the way it works… unless you take very specific actions (see next paragraph) a glob of text between two empty lines is a paragraph, and the renderer will figure out how to make it nice in the “published” format.

But sometimes the writer needs to force a hard break. Simple, he or she uses a <br> or two spaces and a return… or just an extra empty line between paragraphs.

Note: If a person can somehow manage to learn how to do all the other markdown-ish stuff… handling the newline shouldn’t be overly complicated. It just isn’t. And in the end, once you get over the weirdness (it really isn’t, and haven’t you all written any HTML?) it actually makes it easier to work with the editor.

Please, I beg of you, if Joplin is not going to adhere to the standard by default, please at least make how line breaks are handled configurable. It should be as easy as configuring “break: true” and “break: false” somewhere and just flipping that bit. (and I think I found that in… <sourcecode>/Tools/build-website.js If I understand the code correctly.

Thank you. -t0dd

Associated discussions:

The app more or less follow CommonMark, except that line breaks are converted to BR tags.

Do you have an example of Markdown that’s causing problem for you, what the current behaviour is, and what’s the expected one?

It should be easy to add a plugin to change this behavior with a single checkbox should you consider @CalebJohn’s plugin concept…

I remember that there was such a checkbox in the online editor for testing maarkdown-it.

Sure. An example would be me pulling in some document I created elsewhere in Atom or even Vim where I did a lot of reflowing of paragraphs to make the markup text more readable as is… only to then find the rendered text to be very wrong with lines ending with hard breaks where they shouldn’t. I usually end up manually concatenating every paragraph so that it now renders correctly no matter the screen dimensions.

Another example, simply using Joplin as is with the split screen layout, the rendering is dynamically adjusted to my screen… and if I toss in newlines to make it more pleasant to read and edit on the editor side, it has unexpected results on the rendering side. And then if I look at the same document on my mobile phone… more unexpected results.

And then there is the markup itself. If you use embedded links (or any verbose markup), it is very common to put
[that lengthy markup](https://example.com/this_is_a_very_long_link_and_it_is_just_more_readable_to_stick_it_on_its_own_line)
on its own line to make the non-rendered text more readable. Again, the rendering is not ideal and you are forced to keep it on the same line of text Note that I see that discourse here does it incorrectly as well and re-enforces my point, but then again, discourse is more “comments” than “documents” so… whatever.

Another example would be transfering something you were working on in Joplin to say, for example, a Github gist or somesuch… again, you would have to muck with the text all over again to make sure it renders correctly.

What I am asking for…
If folks want and like hard breaks as the default… sure. I think that is fine (though I think it will eventually lead to confusion since markdown is so prevalent nowadays). But, for such deviations from the standard, I would love to see an option in the settings to toggle to traditional/compatible markdown line-break behavior.

By the way. Joplin is awesome. Its UI makes it a solid editor for more than just quick notes and task lists and things. Drifting from the standard, or even simply a reduced support of the standard, is fine IMHO, for comments, notes, and such. But if you use Joplin for a more substantial document… I think it would be beneficial to have this option available.

Thanks again. -t

FYI: added in https://github.com/laurent22/joplin/commit/12ebf44e22d778f6079998e72e0189af59cd094f

1 Like

Glad you closed out this discussion as well. I responded in my github issue filing. Thanks again!