News for hackers. Stuff that matters.
Re:A Prettier JavaScript Formatter by pcwalton on Tuesday January 10, 2017 @10:05PM (#13371416)
> Why does the formatter need to solve this and not the editor? The editor has more information available to it, like the present screen space.

Because making the line wrapping nice requires deep syntax-aware editor integration. Most languages try to be at least somewhat plain-text-editor-friendly.

Re:A Prettier JavaScript Formatter by flukus on Tuesday January 10, 2017 @10:17PM (#13371455)
> Because making the line wrapping nice requires deep syntax-aware editor integration.

Why does it need to be syntax aware?

Re:A Prettier JavaScript Formatter by eddyb on Tuesday January 10, 2017 @11:34PM (#13371777)
Think what happens when you break a line comment (or a string, in languages where it can't span several lines). And that's an easy example at that.
Re:A Prettier JavaScript Formatter by flukus on Wednesday January 11, 2017 @12:05AM (#13371892)
What happens? Nothing as far as I'm aware. The code is still one line.
Re:A Prettier JavaScript Formatter by sobani on Wednesday January 11, 2017 @02:53AM (#13372454)
> Because making the line wrapping nice requires deep syntax-aware editor integration.

'nice' is the key word here