4 ms·
Ask HN: How to format code while commenting on HN?
I've seen some people use code blocks to format text so it's more readable on HN? How do you do that?
Thanks.
- olefoo 14y agoYou prefix it with 4 spaces. # like this
- ColinWright 14y agoThe FAQ is linked at the bottom of the page: http://ycombinator.com/newsfaq.html http://ycombinator.com/newsfaq.html In there it says: What kind of formatting can you use in comments? http://news.ycombinator.com/formatdoc http://news.ycombinator.com/formatdoc On that page it says: Blank lines separate paragraphs. Text after a blank line that is indented by two or more spaces is reproduced verbatim. (This is intended for code.) Text surrounded by asterisks is italicized, if the character after the first asterisk isn't whitespace. Urls become links, except in the text field of a submission.