Have you 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
Have you 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:
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.
Self-service