docs: clarify additionalLanguages with custom language definitions. (#8307)

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
Mikey O'Toole 2022-12-09 17:47:22 +00:00 committed by GitHub
parent 5c09dbfc3d
commit 32dc1eddba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,6 +136,8 @@ const prismIncludeLanguages = (Prism) => {
You can refer to [Prism's official language definitions](https://github.com/PrismJS/prism/tree/master/components) when you are writing your own language definitions.
When adding a custom language definition, you do not need to add the language to the `additionalLanguages` config array, since Docusaurus only looks up the `additionalLanguages` strings in languages that Prism provides. Adding the language import in `prism-include-languages.js` is sufficient.
## Line highlighting {#line-highlighting}
### Highlighting with comments {#highlighting-with-comments}