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

And maybe also make new lines in the comment box translate to new lines in the resulting comment...? :D



That's actually a really good point. I've never looked into that, I just took it for granted that to get a line break on HN you need two consecutive newline chars.

I guess the thing to do would be to look at all (well, lots of) comments that have single newlines and see what would break if they were rendered as actual newlines.


Could be applied to all comments made after a certain future date. That way nothing in the past is poorly formatted


Or just brute-force it with string_replace of all "\n" with "</p>\n<p>" and then remove all the empty "<p></p>".

(why yes, i am a PHP guy, why do you ask?)




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: