Skip to content

Commit

Permalink
Update creating-and-highlighting-code-blocks.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nisbet-hubbard authored Dec 18, 2024
1 parent 23b4b81 commit f5a54ba
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ This will display the code block with syntax highlighting:

![Screenshot of three lines of Ruby code as displayed on {% data variables.product.prodname_dotcom %}. Elements of the code display in purple, blue, and red type for scannability.](/assets/images/help/writing/code-block-syntax-highlighting-rendered.png)

> [!NOTE]
> While both capitalized and lower-case language identifiers are allowed on GitHub, to
> have a fenced code block highlighted on GitHub Pages sites the same way they're
> highlighted on GitHub, you must use lower-case language identifiers.
We use [Linguist](https://github.com/github-linguist/linguist) to perform language detection and to select [third-party grammars](https://github.com/github-linguist/linguist/blob/main/vendor/README.md) for syntax highlighting. You can find out which keywords are valid in [the languages YAML file](https://github.com/github-linguist/linguist/blob/main/lib/linguist/languages.yml).

## Creating diagrams
Expand Down

0 comments on commit f5a54ba

Please sign in to comment.