Skip to content

Commit

Permalink
chore: support for MathJax
Browse files Browse the repository at this point in the history
  • Loading branch information
arshad-yaseen committed Nov 15, 2023
1 parent 3702c2b commit d1a3793
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Binary file modified bun.lockb
Binary file not shown.
13 changes: 11 additions & 2 deletions components/editor/parse-markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,20 @@ function ParseMarkdown({
}: React.ImgHTMLAttributes<HTMLImageElement>) => (
// eslint-disable-next-line @next/next/no-img-element
<img
className={cn("my-2 inline-flex rounded-md border", className)}
className={cn("my-2 inline-flex rounded-lg border", className)}
alt={alt}
{...props}
/>
),
iframe: ({ className, ...props }: ComponentTypes) => (
<iframe
className={cn("my-4 inline-flex max-w-full rounded-lg border", className)}
{...props}
/>
),
div: ({ className, ...props }: ComponentTypes) => (
<div className={cn("", className)} {...props} />
),
hr: ({ ...props }: ComponentTypes) => (
<hr className="my-4 md:my-8" {...props} />
),
Expand Down Expand Up @@ -176,7 +185,7 @@ function ParseMarkdown({
video: ({ className, ...props }: ComponentTypes) => (
<div className="min-h-[300px] w-full">
<video
className={cn("my-4 inline-flex rounded-md border", className)}
className={cn("my-4 inline-flex rounded-lg border", className)}
{...props}
controls
/>
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@
"react-wrap-balancer": "^1.1.0",
"rehype-autolink-headings": "^6.1.1",
"rehype-katex": "^7.0.0",
"rehype-mathjax": "^5.0.0",
"rehype-raw": "^6.1.1",
"rehype-slug": "^5.1.0",
"remark-emoji": "^3.1.1",
"remark-gfm": "^3.0.1",
"remark-math": "^6.0.0",
"remark-math": "^5.0.0",
"resend": "^1.1.0",
"server-only": "^0.0.1",
"sharp": "^0.32.1",
Expand Down

1 comment on commit d1a3793

@vercel
Copy link

@vercel vercel bot commented on d1a3793 Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.