You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason why it converts trailing whitespace into a <br> is because trailing whitespace is difficult to notice in most editor configurations (including the Atom configuration used in that GIF). In order to see it, you need to have "invisibles" set to display and even then it causes issues with editorconfig settings that are set to strip trailing whitespace or other code normalization tools. For example, view the below Markdown sample and try to tell what it will render into:
# test
this first line may or may not have trailing whitespace
which may or may not cause a break before this line
Maybe even screen-shot it, or print it out and try to tell what the author intended. Over all, using trailing whitespace to indicate document layout is just a really bad syntax feature.
I can see the issue; <br>s are also pretty ugly, but they are compiled into the same thing and at least they're explicit so they cannot be confused for a typing mistake like whitespace can. Also, actually needing a line break is pretty rare. Usually you'd separate bodies of text by dividing them into paragraphs so the text can reflow depending upon the size of the screen / paper. For that reason, I think that the ugliness is a good trade-off for explicitness in the places where it is needed.
The main use-case is text that is formatting-sensitive, but isn't code, like addresses or poems. I do agree that the following example isn't quite right.
221B Baker St<br>London, NW1 6XE<br>England
We should change the styleguide to make it look like this:
221B Baker St<br>
London, NW1 6XE<br>
England
The text was updated successfully, but these errors were encountered:
from notslang/atom-tidy-markdown#24:
The text was updated successfully, but these errors were encountered: