Today
I
Fuggin
Learned.
Comment on How to get a new line in a post, but not two?
Dirk@lemmy.ml 1 week ago
It’s markdown syntax. Single newlines are ignored so the text can be styled to be 80 characters wide for example but still have it rendered with another line length while two newlines result in a new paragraph. It’s not about “space efficiency”.
To get a visible linebreak without creating a paragraph, add two spaces at the end of the line you want to break.
hello↵ ↵ this is the first line␣␣↵ this is the second line↵ ↵ more text here↵ ↵
… results in this:
hello
this is the first line
this is the second line
more text here
foggy@lemmy.world 1 week ago
abbadon420@sh.itjust.works 1 week ago
Today you foggy learned
dysprosium@lemmy.dbzer0.com 1 week ago
Aha I see. Very informative, thanks. But what are the presumable downsides of just having enters work as regular enters? I think I understand the appeal of all lines having the same width, but this can still be accomplished by just not using any enters. Right?
And having the rendering work just like the text editor, of course only adds bonus points to the overall user experience. What am I missing?
ValiantDust@feddit.org 1 week ago
You can also use a backslash instead of two spaces. For example, if your phone keyboard converts double space-presses to a period and you are too impatient to do them more slowly (definitely not me).
results in:
Just add a backslash
for a new line
sbeak@sopuli.xyz 1 week ago
Not sure about Android (but if you can swap out your keyboard entirely on Android, you probably can) but on iOS you can disable the double press to create a period! It’s in there with the keyboard settings next to the options to disable stuff like autocorrect
ValiantDust@feddit.org 1 week ago
Yes, I can disable it. But I’m actually using the feature. Which probably contributes to the problem, because muscle memory makes me double press to fast.