-
https://codesandbox.io/p/devbox/ecstatic-curie-nvw927?file=%2Fdocs%2Fhello.mdx%3A7%2C18 When using But in We're using |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
{
h1: H1,
h2: H2,
h3: H3,
h4: H4,
h5: H5,
h6: H6,
ul: Ul,
ol: Ol,
li: Li,
table: Table,
td: Td,
th: Th,
tr: Tr,
hr: Hr,
p: P,
blockquote: Blockquote,
strong: Strong,
a: A,
code: Code,
pre: Pre,
img: Img,
} |
Beta Was this translation helpful? Give feedback.
-
It seems It's weird that why they are not used in default theme? 🤔 Besides, can we export theses components directly instead? // current
import { getCustomMDXComponent } from '@rspress/theme-default'
const { H1 } = getCustomMDXComponent()
// expected
import { H1 } from '@rspress/theme-default' |
Beta Was this translation helpful? Give feedback.
-
rspress/packages/theme-default/src/layout/DocLayout/index.tsx Lines 60 to 68 in 5612c87 I believe they have already been provided in default theme? |
Beta Was this translation helpful? Give feedback.
-
We're still sticked on |
Beta Was this translation helpful? Give feedback.
-
It is the right behaviour of both mdx-js and mdx-rs. If you want to use raw |
Beta Was this translation helpful? Give feedback.
-
I write a small remark plugin to support jsx table in export const remarkJsxTable: Plugin<[], Root> = () => (ast) => {
visit(ast, 'mdxJsxFlowElement', (node) => {
if (
node.name &&
['table', 'thead', 'tbody', 'tfoot', 'tr', 'th', 'td'].includes(
node.name,
) &&
node.data?._mdxExplicitJsx
) {
delete node.data._mdxExplicitJsx
}
})
} |
Beta Was this translation helpful? Give feedback.
I write a small remark plugin to support jsx table in
.mdx
like html table in.md
.