diff --git a/docs/language-highlight.md b/docs/language-highlight.md index 0d66b55b7..25b5bb5d4 100644 --- a/docs/language-highlight.md +++ b/docs/language-highlight.md @@ -8,4 +8,25 @@ ``` +To use the new languages, make sure the code block label matches the part after `prism-` in the file name. FOr example, for `prism-bash.js` write a code block labeled with `bash` like this: + +```` +```bash +echo "hello" +``` +```` + +?> Note that with GitHub-flavored markdown, `sh` and `bash` are effectively aliases of each other, but this is not the case with Prism. So using `sh` will not enable `bash` syntax in this case. + +For `prism-php.js`, it would be: + +```` +```php +function getAdder(int $x): int +{ + return 123; +} +``` +```` + ?> Check the [component files](https://github.com/PrismJS/prism/tree/gh-pages/components) list for more options.