diff --git a/packages/docusaurus-theme-classic/src/theme/MDXComponents/index.tsx b/packages/docusaurus-theme-classic/src/theme/MDXComponents/index.tsx
index 286a86fd50..e121958d4d 100644
--- a/packages/docusaurus-theme-classic/src/theme/MDXComponents/index.tsx
+++ b/packages/docusaurus-theme-classic/src/theme/MDXComponents/index.tsx
@@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/
-import React from 'react';
+import React, {isValidElement} from 'react';
import Link from '@docusaurus/Link';
-import CodeBlock from '@theme/CodeBlock';
+import CodeBlock, {Props} from '@theme/CodeBlock';
import Heading from '@theme/Heading';
import type {MDXComponentsObject} from '@theme/MDXComponents';
@@ -25,7 +25,13 @@ const MDXComponents: MDXComponentsObject = {
a: (props) => ,
pre: (props: any) => {
const {children} = props;
- return test
+## direct using of `pre`
+
+
test+ + +
+1 +2 +3 ++ ## Custom heading id {#custom}