Run prettier
This commit is contained in:
parent
e6806aaa54
commit
24cb81bce0
21 changed files with 4203 additions and 3520 deletions
|
|
@ -1,12 +1,12 @@
|
|||
import Link from "next/link";
|
||||
import React, { memo } from "react";
|
||||
import ReactMarkdown from "react-markdown";
|
||||
import remarkGfm from "remark-gfm";
|
||||
import Link from 'next/link';
|
||||
import React, { memo } from 'react';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
|
||||
const NonMemoizedMarkdown = ({ children }: { children: string }) => {
|
||||
const components = {
|
||||
code: ({ node, inline, className, children, ...props }: any) => {
|
||||
const match = /language-(\w+)/.exec(className || "");
|
||||
const match = /language-(\w+)/.exec(className || '');
|
||||
return !inline && match ? (
|
||||
<pre
|
||||
{...props}
|
||||
|
|
@ -116,5 +116,5 @@ const NonMemoizedMarkdown = ({ children }: { children: string }) => {
|
|||
|
||||
export const Markdown = memo(
|
||||
NonMemoizedMarkdown,
|
||||
(prevProps, nextProps) => prevProps.children === nextProps.children,
|
||||
(prevProps, nextProps) => prevProps.children === nextProps.children
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue