From 138b989f784994e0f872cf1941a3969e6d916ae3 Mon Sep 17 00:00:00 2001 From: Joe Pea Date: Sat, 27 Jun 2020 01:20:47 -0700 Subject: [PATCH 1/2] Update language-highlight.md --- docs/language-highlight.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/language-highlight.md b/docs/language-highlight.md index 0d66b55b7..03694db40 100644 --- a/docs/language-highlight.md +++ b/docs/language-highlight.md @@ -8,4 +8,24 @@ ``` +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. From 9f3cf1e308f5c2befdab6ef702f3e15f3d576443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=94=81?= <52o@qq52o.cn> Date: Sat, 27 Jun 2020 16:27:21 +0800 Subject: [PATCH 2/2] Update language-highlight.md --- docs/language-highlight.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/language-highlight.md b/docs/language-highlight.md index 03694db40..25b5bb5d4 100644 --- a/docs/language-highlight.md +++ b/docs/language-highlight.md @@ -22,8 +22,9 @@ For `prism-php.js`, it would be: ```` ```php -function getAdder(int $x): int { - return 123 +function getAdder(int $x): int +{ + return 123; } ``` ````