Hacker News new | past | comments | ask | show | jobs | submit login

A good question from that gist thread:

>Why does markdown do this? If I want two lines to run consecutively I won’t introduce a newline.




A bit of an educated guess but I believe the answer stems from markdown originally targeting terminals, which would line wrap but not word wrap. So you could get ugly output like this:

    hello, wor
    ld!
(albeit this is assuming the terminal is only 10 characters wide but I hope you get the point)

So it used to be common for developers and sysadmins to manually wrap to 80 characters (a habit I still regularly catch myself doing even now). Obviously with GUI readers and variable-width characters, you wouldn't want that 80 character manual wrap honoured.


Wrapping sentences into short functional parts (motivated by more or less arbitrary limits like 80 characters) helps having easily editable and readable text.


Apologies but I'm not sure I understand your point. Are you able to elaborate?


As others, I've grown accustomed to wrapping lines to fit in small terminals, and I started avoiding breaking the line randomly. Instead I try to break after self-sufficient parts of sentences so that lines flow naturally after one another. That usually means after a comma, before a connector word, or after an enumeration. It's not always possible, but I find that when I need to rewrite a sentence to be naturally breakable it usually reads better. Furthermore, each line often ends up expressing a whole idea, which means working on that idea usually translates to simple line operations, which fits nicely in an expressive text editor like Vim.


Hitting enter at the end of a line lets you manually wrap paragraphs in a way that will fit into an 80 or 120-char wide terminal.

Ignoring those line breaks is desirable when reflowing the text into e.g. HTML output




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: