diff --git a/packages/docusaurus-theme-common/src/utils/codeBlockUtils.ts b/packages/docusaurus-theme-common/src/utils/codeBlockUtils.ts index 8b89983bcbac..dbc24112151c 100644 --- a/packages/docusaurus-theme-common/src/utils/codeBlockUtils.ts +++ b/packages/docusaurus-theme-common/src/utils/codeBlockUtils.ts @@ -61,6 +61,10 @@ function getAllMagicCommentDirectiveStyles(lang: string) { case 'py': return getCommentPattern(['python']); + case 'markdown': + case 'md': + return getCommentPattern(['html', 'jsx']); + default: // all comment types return getCommentPattern(Object.keys(commentPatterns) as CommentType[]);