fix(mdx-components): restore list decoration for ordered and unordered lists

- Restored default list decorations (bullet points for `ul` and numbers for `ol`).
- Solution based on issue from `sindresorhus/github-markdown-css#103`.
This commit is contained in:
cfngc4594 2025-03-10 20:34:10 +08:00
parent 13fd49fd18
commit aaa4c1def5

View File

@ -3,4 +3,6 @@ import { Pre } from "@/components/content/pre";
export const MdxComponents = {
pre: (props: HTMLAttributes<HTMLPreElement>) => <Pre {...props} />,
ol: (props: HTMLAttributes<HTMLOListElement>) => <ol style={{ listStyle: "revert" }} {...props} />,
ul: (props: HTMLAttributes<HTMLUListElement>) => <ul style={{ listStyle: "revert" }} {...props} />,
};