diff --git a/packages/core/client/src/schema-component/antd/markdown/highlight-theme/default.less b/packages/core/client/src/schema-component/antd/markdown/highlight-theme/default.less index a7ee744285..cf1f8193cc 100644 --- a/packages/core/client/src/schema-component/antd/markdown/highlight-theme/default.less +++ b/packages/core/client/src/schema-component/antd/markdown/highlight-theme/default.less @@ -19,6 +19,12 @@ padding: 3px 5px } + :not(pre) code { + padding: 2px 5px; + color: #d56161; + background: #f6f7f9; + } + blockquote { border-left: 4px solid #ccc; padding-left: 20px; diff --git a/packages/core/client/src/schema-component/antd/markdown/md.ts b/packages/core/client/src/schema-component/antd/markdown/md.ts index 18cba1ed50..f2389a822c 100644 --- a/packages/core/client/src/schema-component/antd/markdown/md.ts +++ b/packages/core/client/src/schema-component/antd/markdown/md.ts @@ -1,6 +1,8 @@ import MarkdownIt from 'markdown-it'; import markdownItHighlightjs from 'markdown-it-highlightjs'; import mermaidPlugin from './markdown-it-plugins/mermaidPlugin'; +import './highlight-theme/default.less'; +import './highlight-theme/table.less'; const md = new MarkdownIt({ html: true, diff --git a/packages/core/client/src/schema-component/antd/markdown/util.ts b/packages/core/client/src/schema-component/antd/markdown/util.ts index 702fdb1241..c41705c500 100644 --- a/packages/core/client/src/schema-component/antd/markdown/util.ts +++ b/packages/core/client/src/schema-component/antd/markdown/util.ts @@ -1,6 +1,4 @@ import { useEffect, useState } from 'react'; -import './highlight-theme/default.less'; -import './highlight-theme/table.less'; export async function parseMarkdown(text: string) { if (!text) {