Comment on Why does not a CR (Carriage Return) automatically start a new line on some online text editors?

schnurrito@discuss.tchncs.de ⁨1⁩ ⁨week⁩ ago

If you mean here on Lemmy or other markdown based sites, I think the reason is that it would become incoherent in terms of the HTML it generates.

HTML is supposed to be a format that describes meaning, not presentation. The meaning is that Lemmy comments consist of paragraphs (p elements) like any piece of text does. The way to start a new paragraph is to type two newlines in a row.

On occasion text isn’t divided into paragraphs, like your example of poetry. The way to represent that meaning in HTML is a br element. You already described how to generate that in Markdown. But that is a rare special case. Makes sense that it requires special syntax so we are sure people did it accidentally.

Old forum software like phpBB or SMF worked the way you imagine. If I am not mistaken they translated a newline in the BBCode to an HTML br element, unfriendly to screen readers and automated technologies in the ordinary case where text was divided into paragraphs.

source
Sort:hotnewtop