🧩 Feature request
Description
markdownPlugin does not highlight some React / StencilJS components because highlight.js which is used in the plugin does not support .tsx files.
Example
```tsx
type Props = {
value: number;
};
const SampleComponent: React.FC<Props> = (props) => (
<p>{props.value}</p>
);
Describe the solution you'd like
I think Prism is a good alternative to solve this problem.
marked.setOptions({
renderer: new marked.Renderer(),
highlight: (code, language) => {
// const hljs = require('highlight.js');
// const validLanguage = hljs.getLanguage(language) ? language : 'plaintext';
// return hljs.highlight(validLanguage, code).value;
const Prism = require("prismjs");
const loadLanguages = require("prismjs/components/index");
loadLanguages(language);
const validLanguage = Prism.languages[language] ? language : 'textfile';
return Prism.highlight(code, Prism.languages[validLanguage], validLanguage);
},
Describe alternatives you've considered
🧩 Feature request
Description
markdownPlugindoes not highlight some React / StencilJS components becausehighlight.jswhich is used in the plugin does not support.tsxfiles.Example
Describe the solution you'd like
I think Prism is a good alternative to solve this problem.
Describe alternatives you've considered
.tsxasjavascriptortypescripthighlight.jssupports.tsx(typescript) Add JSX support to Typescript highlightjs/highlight.js#1155