HN Comment Formatting
This cluster revolves around advice and complaints on formatting code blocks, quotes, and text in Hacker News comments, including proper indentation with spaces, lack of support for fenced code blocks, use of > for quotes, and readability issues like horizontal scrolling on mobile.
Activity Over Time
Top Contributors
Keywords
Sample Comments
It's really hard to read your post.On HN, for code, put two spaces at the beginning of the line. ``` doesn't do anything.
If you indent your pasted stuff by four spaces, HN treats it as code. That might help.
No offense, code blocks are easier and HN can fix them so they render properly.
On HN you can have a code block by adding 2 spaces before each line
HN doesn't support fenced code blocks. You should indent code with 2 (or more) spaces to make it shown verbatim.https://news.ycombinator.com/formatdoc
It is wrong to format an HN textual quote as a code block ;-)
Indentation is for short monospace code snippets, not blockquotes.HN cannot render blockquotes, it breaks the page layout.
Prefix your code with two spaces on each line and HN will include it verbatim. Otherwise it thinks you have paragraphs with line breaks that it ignores.
blame HN, I didn't format them as code blocks. I put #.texttext which in any other context would be text not code
Unfortunately HN doesn't support commonmark's triple backtick code blocks. You'll need to use 4 spaces before each line of code.