mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-01 02:12:36 +02:00
fix(theme): only parse HTML- and JSX-style comments in MD code (#7033)
This commit is contained in:
parent
57f7881a3d
commit
755b03861c
1 changed files with 4 additions and 0 deletions
|
@ -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[]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue