0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

chore(console): bump react-markdown (#4648)

bump react-markdown and remark version
This commit is contained in:
simeng-li 2023-10-13 10:20:50 +08:00 committed by GitHub
parent 1fcb28b31b
commit 608c2699cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 398 additions and 370 deletions

View file

@ -9,6 +9,7 @@
"prepare": "if test \"$NODE_ENV\" != \"production\" && test \"$CI\" != \"true\" ; then husky install ; fi",
"prepack": "pnpm -r prepack",
"dev": "pnpm -r prepack && pnpm start:dev",
"dev:cloud": "IS_CLOUD=1 CONSOLE_PUBLIC_URL=/ pnpm dev",
"start:dev": "pnpm -r --parallel --filter=!@logto/integration-tests --filter \"!./packages/connectors/connector-*\" dev",
"start": "cd packages/core && NODE_ENV=production node .",
"cli": "logto",

View file

@ -105,14 +105,14 @@
"react-hook-form": "^7.43.9",
"react-hot-toast": "^2.2.0",
"react-i18next": "^12.3.1",
"react-markdown": "^8.0.7",
"react-markdown": "^9.0.0",
"react-modal": "^3.15.1",
"react-paginate": "^8.1.3",
"react-router-dom": "^6.10.0",
"react-syntax-highlighter": "^15.5.0",
"react-timer-hook": "^3.0.5",
"recharts": "^2.1.13",
"remark-gfm": "^3.0.1",
"remark-gfm": "^4.0.0",
"stylelint": "^15.0.0",
"swr": "^2.2.0",
"titleize": "^4.0.0",

View file

@ -54,15 +54,15 @@ function Markdown({ className, children }: Props) {
remarkPlugins={[remarkGfm]}
className={classNames(styles.markdown, className)}
components={{
code: ({ inline, className, children, ...props }) => {
code: ({ className, children, ...props }) => {
const [, codeBlockType] = /language-(\w+)/.exec(className ?? '') ?? [];
return inline ? (
return codeBlockType ? (
<CodeEditor isReadonly language={codeBlockType} value={String(children)} />
) : (
<code className={styles.inlineCode} {...props}>
{children}
</code>
) : (
<CodeEditor isReadonly language={codeBlockType} value={String(children)} />
);
},
img: ({ src, alt }) => {

File diff suppressed because it is too large Load diff