render markdown code element

This commit is contained in:
codetypes committed 2024-07-12 23:43:30 +08:00
1 parent c1fbfbc8fa
commit 5b249c14c8
5 files changed
+16 -7

No files matched your search

+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "behavior3editor", "name": "behavior3editor",
"version": "1.4.0", "version": "1.5.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "behavior3editor", "name": "behavior3editor",
"version": "1.4.0", "version": "1.5.0",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "behavior3editor", "name": "behavior3editor",
"version": "1.4.0", "version": "1.5.0",
"main": "dist-electron/main/index.js", "main": "dist-electron/main/index.js",
"description": "行为树编辑器", "description": "行为树编辑器",
"author": "zhandouxiaojiji & codetypes", "author": "zhandouxiaojiji & codetypes",
+2 -2
View File
@@ -3,13 +3,13 @@
"name": "AlwaysFail", "name": "AlwaysFail",
"type": "Decorator", "type": "Decorator",
"desc": "始终返回失败", "desc": "始终返回失败",
"doc": "+ 只能有一个子节点,多个仅执行第一个\n+ 不管子节点是否成功都返回「失败」" "doc": "+ 只能有一个子节点,多个仅执行第一个\n+ 不管子节点是否成功都返回`失败`"
}, },
{ {
"name": "AlwaysSuccess", "name": "AlwaysSuccess",
"type": "Decorator", "type": "Decorator",
"desc": "始终返回成功", "desc": "始终返回成功",
"doc": "+ 只能有一个子节点,多个仅执行第一个\n+ 不管子节点是否成功都返回「成功」" "doc": "+ 只能有一个子节点,多个仅执行第一个\n+ 不管子节点是否成功都返回`成功`"
}, },
{ {
"name": "Check", "name": "Check",
+2 -2
View File
@@ -291,7 +291,7 @@ const NodeInspector: FC = () => {
}} }}
/> />
</Form.Item> </Form.Item>
<Markdown>{def.doc}</Markdown> <Markdown className="b3-markdown">{def.doc}</Markdown>
{def.input && def.input.length > 0 && ( {def.input && def.input.length > 0 && (
<> <>
<Divider orientation="left"> <Divider orientation="left">
@@ -476,7 +476,7 @@ const NodeDefInspector: FC = () => {
> >
<TextArea autoSize disabled={true} /> <TextArea autoSize disabled={true} />
</Form.Item> </Form.Item>
<Markdown>{data.doc}</Markdown> <Markdown className="b3-markdown">{data.doc}</Markdown>
{data.input && data.input.length > 0 && ( {data.input && data.input.length > 0 && (
<> <>
<Divider orientation="left"> <Divider orientation="left">
+9
View File
@@ -192,3 +192,12 @@ body {
.b3-editor-filter-selected { .b3-editor-filter-selected {
background-color: var(--b3-color-selected) !important; background-color: var(--b3-color-selected) !important;
} }
code {
background-color: #6e768166;
border-radius: 6px;
padding: 3px 6px;
margin: 0 3px;
white-space: break-spaces;
box-sizing: border-box;
}