mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 08:19:07 +02:00
fix(mdx-loader): properly unwrap mdxAdmonitionTitle placeholder (#8246)
This commit is contained in:
parent
1077d8ad39
commit
e301523138
1 changed files with 2 additions and 2 deletions
|
@ -19,10 +19,10 @@ function extractMDXAdmonitionTitle(children: ReactNode): {
|
|||
React.isValidElement(item) &&
|
||||
(item.props as {mdxType: string} | null)?.mdxType ===
|
||||
'mdxAdmonitionTitle',
|
||||
);
|
||||
) as JSX.Element | undefined;
|
||||
const rest = <>{items.filter((item) => item !== mdxAdmonitionTitle)}</>;
|
||||
return {
|
||||
mdxAdmonitionTitle,
|
||||
mdxAdmonitionTitle: mdxAdmonitionTitle?.props.children,
|
||||
rest,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue