Hacker News new | ask | show | jobs
by jefftk 2476 days ago
The most common way to do this is with triple backticks:

    Some regular text

    ```
    Preformatted text
    ```
While this isn't in the original spec (https://daringfireball.net/projects/markdown/syntax#precode) it's supported by GitHub, Stack Overflow, and most other places I find myself using a markdown flavor.
1 comments

This syntax even made its way into CommonMark (https://spec.commonmark.org/0.29/#fenced-code-blocks)