← Back to context

Comment by schrodinger

1 day ago

Single inline backticks like `this` aren't recognized (although still useful in my opinion, they just don't change the rendering).

Triple backticks also aren't recognized. However, if you indent by I believe 4 spaces, it formats it in a fixed width font presuming it's code.

Let's try (4 spaces):

    func main() {
        fmt.Println("Hello, HN!")
    }

None for comparison:

func main() { fmt.Println("Hello, HN!") }

2 spaces triggers the formatting, the rest just get printed: https://news.ycombinator.com/formatdoc

  2 spaces Lorem ipsum dolor sit amet,
  consectetur adipiscing elit, sed do eiusmod
  tempor incididunt ut labore et dolore magna
  aliqua.

vs

    4 spaces Lorem ipsum dolor sit amet,
    consectetur adipiscing elit, sed do eiusmod
    tempor incididunt ut labore et dolore magna
    aliqua.

Seems I missed the window to be able to edit my message, but I'll remember this info for next time, thanks!