in packages/docusaurus-theme-common/src/utils/codeBlockUtils.ts [45:74]
function getAllMagicCommentDirectiveStyles(lang: string) {
switch (lang) {
case 'js':
case 'javascript':
case 'ts':
case 'typescript':
return getCommentPattern(['js', 'jsBlock']);
case 'jsx':
case 'tsx':
return getCommentPattern(['js', 'jsBlock', 'jsx']);
case 'html':
return getCommentPattern(['js', 'jsBlock', 'html']);
case 'python':
case 'py':
case 'bash':
return getCommentPattern(['bash']);
case 'markdown':
case 'md':
// Text uses HTML, front matter uses bash
return getCommentPattern(['html', 'jsx', 'bash']);
default:
// all comment types
return getCommentPattern(Object.keys(commentPatterns) as CommentType[]);
}
}