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.

➡️ Stable 0.5x Other
3,214
Comments
20
Years Active
5
Top Authors
#6366
Topic ID

Activity Over Time

2007
25
2008
51
2009
98
2010
69
2011
107
2012
119
2013
143
2014
125
2015
121
2016
203
2017
258
2018
245
2019
341
2020
315
2021
181
2022
215
2023
200
2024
179
2025
193
2026
26

Keywords

xnapper.com e.g HN RawVec PhantomData CODE GitHub ycombinator.com NonNull SNIPPET code spaces blocks formatting hn text line snippets quote block

Sample Comments

WalterGR May 18, 2022 View on HN

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.

Ygg2 Oct 12, 2025 View on HN

If you indent your pasted stuff by four spaces, HN treats it as code. That might help.

exelius Mar 26, 2018 View on HN

No offense, code blocks are easier and HN can fix them so they render properly.

bmacho Dec 11, 2025 View on HN

On HN you can have a code block by adding 2 spaces before each line

jwilk Sep 23, 2018 View on HN

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

dredmorbius Dec 6, 2017 View on HN

It is wrong to format an HN textual quote as a code block ;-)

lonelappde May 7, 2020 View on HN

Indentation is for short monospace code snippets, not blockquotes.HN cannot render blockquotes, it breaks the page layout.

Jtsummers Aug 19, 2016 View on HN

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.

tokyodude Dec 27, 2018 View on HN

blame HN, I didn't format them as code blocks. I put #.texttext which in any other context would be text not code

judge2020 Jul 9, 2020 View on HN

Unfortunately HN doesn't support commonmark's triple backtick code blocks. You'll need to use 4 spaces before each line of code.