News for hackers. Stuff that matters.
Re:For the Love of Pipes by majewsky on Tuesday January 22, 2019 @07:50AM (#18967864)
If bots were not discouraged on news.yc, I would have implemented a bot for this long ago. Code-block quotes are so atrocious, esp. on mobile devices.
Re:For the Love of Pipes by Leace on Tuesday January 22, 2019 @08:38AM (#18968122)
It seems "white-space: pre-wrap" on code block would solve most of the problem. There is also additional "max-width" on the pre that I think is not needed.
Re:For the Love of Pipes by masklinn on Tuesday January 22, 2019 @12:38PM (#18970261)
That would break actual code snippet.

What would solve most of the problems is HN actually implementing markdown instead of the current half-assed crap.

Re:For the Love of Pipes by abraae on Tuesday January 22, 2019 @01:27PM (#18970816)
I would hate to see the day HN allowed any way to bold sections of text.

It's way more restful purveying a page of uniformly restrained text.

Re:For the Love of Pipes by masklinn on Tuesday January 22, 2019 @01:54PM (#18971140)
> I would hate to see the day HN allowed any way to bold sections of text.

HN already has shitty italics (shitty in that it commonly matches and eats things you don't want to be italicised e.g. multiplications, pointers, … in part though not only because HN doesn't have inline code). "bold" can just be styled as italics, or it can be styled as a medium or semibold. It's not an issue, and even less worth it given how absolute garbage the current markup situation is.

Re:For the Love of Pipes by yen223 on Tuesday January 22, 2019 @05:43PM (#18973393)
For a site that's meant to target programmers, HN's handling of code blocks is pretty poor.

Just give me the triple-tilde code block syntax please!

Re:For the Love of Pipes by masklinn on Wednesday January 23, 2019 @11:29AM (#18979658)
> For a site that's meant to target programmers, HN's handling of code blocks is pretty poor.

Meh. It does literal code blocks, they work fine.

That's pretty much the only markup feature which does, which is impressively bad given HN only has two markup feature: literal code blocks and emphasis.

It's not like they're going to add code coloration or anything.

And while fenced code blocks are slightly more convenient (no need to indent), pasting a snippet in a text editor and indenting it is hardly a difficult task.

Re:For the Love of Pipes by dahfizz on Tuesday January 22, 2019 @01:46PM (#18971030)
How is that meaningfully different to italics in that regard?
Re:For the Love of Pipes by K2L8M11N2 on Tuesday January 22, 2019 @02:52PM (#18971769)
Bold text stands out when visually scanning the page, italics don't.
Re:For the Love of Pipes by vorpalhex on Tuesday January 22, 2019 @12:59PM (#18970485)
What is it with so many products (HN, Discord, Slack) building half assed markdown implementations that aren't actually markdown?
Re:For the Love of Pipes by rhacker on Tuesday January 22, 2019 @01:20PM (#18970720)
What's Markdown?

- Slack product development

(that was a joke but is likely the answer to your question)

Re:For the Love of Pipes by oldmanhorton on Tuesday January 22, 2019 @03:31PM (#18972131)
To be pedantic, there's debate about what is "actually markdown". No one would say it's the flavor HN implements, but the easiest way to win some games is to simply not play
Re:For the Love of Pipes by quietbritishjim on Tuesday January 22, 2019 @01:02PM (#18970523)
That would break any existing comments that happened to be using markdown syntax as punctuation. Although I suppose you could have a flag day for the changeover and format differently based on comment creation time.

But I think the very limited formatting is just fine anyway. For the above comment as an example, I agree the code formatting looks awful, especially on mobile. But the version with >'s is ok, and I don't think proper bullet points or a quote bar would have improved it dramatically.

Re:For the Love of Pipes by Leace on Tuesday January 22, 2019 @01:47PM (#18971043)
Conversations.im uses an interesting trick for rendering Markdown [0] - it leaves the syntax as is, so in the worst case you've got text with weird bold/italics, but the characters are 1:1 identical to what was sent.

[0]: Actually not Markdown but a subset but it's not important.

Re:For the Love of Pipes by jolmg on Tuesday January 22, 2019 @12:11PM (#18969920)
I agree with you on the max-width. I can't see whatever benefit it's supposed to provide outweigh the annoyance of having to scroll horizontally when there is a lot of empty space to the right that could be used to display more text.

I'm not too convinced on the wrapping of code, though.

Re:For the Love of Pipes by kakarot on Tuesday January 22, 2019 @12:15PM (#18969981)
white-space: pre-wrap on a code block could lead to confusion. Any change should be an optional setting in your user profile.

However you're definitely right about dropping the max-width property.