Skip to content

Commit

Permalink
docs: clarify additionalLanguages with custom language definitions. (#…
Browse files Browse the repository at this point in the history
…8307)

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
  • Loading branch information
3 people committed Dec 9, 2022
1 parent 5c09dbf commit 32dc1ed
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 32dc1ed

Please sign in to comment.