diff --git a/assets/images/help/writing/fenced-code-show-backticks-rendered.png b/assets/images/help/writing/fenced-code-show-backticks-rendered.png new file mode 100644 index 0000000000..74e486f898 Binary files /dev/null and b/assets/images/help/writing/fenced-code-show-backticks-rendered.png differ diff --git a/content/github/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks.md b/content/github/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks.md index 6f70d3bb1b..9339981744 100644 --- a/content/github/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks.md +++ b/content/github/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks.md @@ -5,10 +5,11 @@ redirect_from: - /articles/creating-and-highlighting-code-blocks - /github/writing-on-github/creating-and-highlighting-code-blocks versions: - free-pro-team: '*' - enterprise-server: '*' - github-ae: '*' + free-pro-team: "*" + enterprise-server: "*" + github-ae: "*" --- + ### Fenced code blocks You can create fenced code blocks by placing triple backticks \`\`\` before and after the code block. We recommend placing a blank line before and after code blocks to make the raw formatting easier to read. @@ -29,7 +30,22 @@ function test() { {% endtip %} +To display triple backticks in a fenced code block, wrap them inside quadruple backticks. + + +
+```` 
+```
+Look! You can see my backticks.
+```
+````
+
+ +![Rendered fenced code with backticks block](/assets/images/help/writing/fenced-code-show-backticks-rendered.png) + + ### Syntax highlighting + You can add an optional language identifier to enable syntax highlighting in your fenced code block.