-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
featureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Description
Hey, I tried to add PHP for code highlighting in the code blocks and according to the doc for this PHP needs to be added in the prism array.
After running the command:
npm run swizzle @docusaurus/theme-classic prism-include-languages
And adding 'PHP' to the array, it didn't work; I still had no code highlighting.
After a few minutes troubleshooting, I wrote PHP in lower case (because out of habit I write it in upper case) and it worked.
I'm unsure this is a bug or not. In Markdown, it functions correctly, and no distinction is made as to whether the programming language is written in upper case or lower case (as shown below). If it's not a bug, I believe it's worth mentioning in the documentation to avoid confusion for future users.
const prismIncludeLanguages = (Prism) => {
// ...
additionalLanguages.forEach((lang) => {
require(`prismjs/components/prism-${lang}`);
});
require('/path/to/your/prism-language-definition');
// ...
};
const prismIncludeLanguages = (Prism) => {
// ...
additionalLanguages.forEach((lang) => {
require(`prismjs/components/prism-${lang}`);
});
require('/path/to/your/prism-language-definition');
// ...
};
Self-service
- I'd be willing to address this documentation request myself.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.This is not a bug or issue with Docusausus, per se. It is a feature request for the future.