We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This feature is not working properly: https://github.com/ipikuka/remark-flexible-containers?tab=readme-ov-file#without-a-type-and-a-title
Browser console:
Markdown file:
::: 手动创建错误成绩,或是通过其他方式导入了错误成绩,均会导致查分器计算出的 Best 50 与玩家 DX Rating 不一致。 :::
Source code:
const Content = ({ markdown }: { markdown: string }) => { const navigate = useNavigate(); return ( <Markdown remarkPlugins={[remarkGfm, remarkFlexibleContainers]} rehypePlugins={[ rehypeSlug, [rehypeAutolinkHeadings, { behavior: 'wrap', properties: { className: classes.sectionHeading, }, }] ]} components={{ ... div({ className, children, ...props }) { const classesName = className ? className.split(" ") : []; if (classesName.includes("remark-container")) { let icon = <IconInfoCircle />; let color = "blue"; if (classesName.includes("warning")) { icon = <IconAlertCircle />; color = "yellow"; } if (classesName.includes("danger")) { icon = <IconAlertCircle />; color = "red"; } const childrenArray = React.Children.toArray(children); const titleChild = childrenArray.find( child => React.isValidElement(child) && child.props.className?.includes('remark-container-title') ) as React.ReactElement; return <Alert className={classes.alert} radius="md" variant="light" color={color} title={titleChild?.props.children} icon={icon}> {childrenArray.filter( (child) => !React.isValidElement(child) || !child.props.className?.includes('remark-container-title') )} </Alert> } return <div className={className} {...props}>{children}</div>; }, ... }} > {markdown} </Markdown> ) }
Expect result:
The text was updated successfully, but these errors were encountered:
Thanks for reporting the issue, I will take care it.
Sorry, something went wrong.
No branches or pull requests
This feature is not working properly: https://github.com/ipikuka/remark-flexible-containers?tab=readme-ov-file#without-a-type-and-a-title
Browser console:

Markdown file:
Source code:
Expect result:

The text was updated successfully, but these errors were encountered: