浏览代码

Merge remote-tracking branch 'origin/dev' into dev

Vanessa 2 年之前
父节点
当前提交
4229e68434

+ 97 - 103
app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-h361q1i/20200924093441-ft2rhps.sy

@@ -7,7 +7,7 @@
 		"title": "Formatting elements",
 		"title": "Formatting elements",
 		"title-img": "background-color:#269;background-image: linear-gradient(white 2px, transparent 2px),linear-gradient(90deg, white 2px, transparent 2px),linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px),linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px);background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;background-position:-2px -2px, -2px -2px, -1px -1px, -1px -1px;",
 		"title-img": "background-color:#269;background-image: linear-gradient(white 2px, transparent 2px),linear-gradient(90deg, white 2px, transparent 2px),linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px),linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px);background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;background-position:-2px -2px, -2px -2px, -1px -1px, -1px -1px;",
 		"type": "doc",
 		"type": "doc",
-		"updated": "20220909095340"
+		"updated": "20220916200115"
 	},
 	},
 	"Children": [
 	"Children": [
 		{
 		{
@@ -31,7 +31,7 @@
 			"ListData": {},
 			"ListData": {},
 			"Properties": {
 			"Properties": {
 				"id": "20210104091509-8csaq4j",
 				"id": "20210104091509-8csaq4j",
-				"updated": "20220521234603"
+				"updated": "20220916200115"
 			},
 			},
 			"Children": [
 			"Children": [
 				{
 				{
@@ -55,33 +55,11 @@
 							},
 							},
 							"Children": [
 							"Children": [
 								{
 								{
-									"Type": "NodeBlockRef",
-									"Data": "span",
-									"Children": [
-										{
-											"Type": "NodeOpenParen"
-										},
-										{
-											"Type": "NodeOpenParen"
-										},
-										{
-											"Type": "NodeBlockRefID",
-											"Data": "20200923234011-ieuun1p"
-										},
-										{
-											"Type": "NodeBlockRefSpace"
-										},
-										{
-											"Type": "NodeBlockRefText",
-											"Data": "Please Start Here"
-										},
-										{
-											"Type": "NodeCloseParen"
-										},
-										{
-											"Type": "NodeCloseParen"
-										}
-									]
+									"Type": "NodeTextMark",
+									"TextMarkType": "block-ref",
+									"TextMarkBlockRefID": "20200923234011-ieuun1p",
+									"TextMarkBlockRefSubtype": "s",
+									"TextMarkTextContent": "Please Start Here"
 								}
 								}
 							]
 							]
 						}
 						}
@@ -112,6 +90,92 @@
 									"TextMarkType": "a",
 									"TextMarkType": "a",
 									"TextMarkAHref": "https://ld246.com",
 									"TextMarkAHref": "https://ld246.com",
 									"TextMarkTextContent": "Hyperlink"
 									"TextMarkTextContent": "Hyperlink"
+								}
+							]
+						}
+					]
+				},
+				{
+					"ID": "20220916200111-8pnrqr2",
+					"Type": "NodeListItem",
+					"ListData": {
+						"BulletChar": 42,
+						"Marker": "Kg=="
+					},
+					"Properties": {
+						"id": "20220916200111-8pnrqr2",
+						"updated": "20220916200115"
+					},
+					"Children": [
+						{
+							"ID": "20220916200111-4swvak0",
+							"Type": "NodeParagraph",
+							"Properties": {
+								"id": "20220916200111-4swvak0",
+								"updated": "20220916200114"
+							},
+							"Children": [
+								{
+									"Type": "NodeText",
+									"Data": "Picture"
+								}
+							]
+						},
+						{
+							"ID": "20210604225055-4pq8g38",
+							"Type": "NodeParagraph",
+							"Properties": {
+								"id": "20210604225055-4pq8g38",
+								"updated": "20210604225153"
+							},
+							"Children": [
+								{
+									"Type": "NodeText",
+									"Data": "Support direct copy and paste or drag and upload. After uploading, you can adjust the size by dragging the sidebar."
+								}
+							]
+						},
+						{
+							"ID": "20220916200115-rstez65",
+							"Type": "NodeParagraph",
+							"Properties": {
+								"id": "20220916200115-rstez65"
+							},
+							"Children": [
+								{
+									"Type": "NodeImage",
+									"Data": "span",
+									"Properties": {
+										"style": "display: block;"
+									},
+									"Children": [
+										{
+											"Type": "NodeBang"
+										},
+										{
+											"Type": "NodeOpenBracket"
+										},
+										{
+											"Type": "NodeLinkText"
+										},
+										{
+											"Type": "NodeCloseBracket"
+										},
+										{
+											"Type": "NodeOpenParen"
+										},
+										{
+											"Type": "NodeLinkDest",
+											"Data": "assets/siyuan-128-20210604092437-7iqzf90.png"
+										},
+										{
+											"Type": "NodeCloseParen"
+										}
+									]
+								},
+								{
+									"Type": "NodeKramdownSpanIAL",
+									"Data": "{: style=\"display: block;\"}"
 								},
 								},
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
@@ -432,6 +496,10 @@
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "inline-math",
 									"TextMarkType": "inline-math",
 									"TextMarkInlineMathContent": "a^2 + b^2 = \\color{red}c^2"
 									"TextMarkInlineMathContent": "a^2 + b^2 = \\color{red}c^2"
+								},
+								{
+									"Type": "NodeText",
+									"Data": "\n"
 								}
 								}
 							]
 							]
 						}
 						}
@@ -742,80 +810,6 @@
 				}
 				}
 			]
 			]
 		},
 		},
-		{
-			"ID": "20210104091509-xzmngg2",
-			"Type": "NodeHeading",
-			"HeadingLevel": 2,
-			"Properties": {
-				"id": "20210104091509-xzmngg2",
-				"updated": "20210415200914"
-			},
-			"Children": [
-				{
-					"Type": "NodeText",
-					"Data": "Pictures"
-				}
-			]
-		},
-		{
-			"ID": "20210604225055-4pq8g38",
-			"Type": "NodeParagraph",
-			"Properties": {
-				"id": "20210604225055-4pq8g38",
-				"updated": "20210604225153"
-			},
-			"Children": [
-				{
-					"Type": "NodeText",
-					"Data": "Support direct copy and paste or drag and upload. After uploading, you can adjust the size by dragging the sidebar."
-				}
-			]
-		},
-		{
-			"ID": "20210604225041-9i92rk2",
-			"Type": "NodeParagraph",
-			"Properties": {
-				"id": "20210604225041-9i92rk2",
-				"updated": "20210604225041"
-			},
-			"Children": [
-				{
-					"Type": "NodeImage",
-					"Data": "span",
-					"Properties": {
-						"style": "display: block;"
-					},
-					"Children": [
-						{
-							"Type": "NodeBang"
-						},
-						{
-							"Type": "NodeOpenBracket"
-						},
-						{
-							"Type": "NodeLinkText"
-						},
-						{
-							"Type": "NodeCloseBracket"
-						},
-						{
-							"Type": "NodeOpenParen"
-						},
-						{
-							"Type": "NodeLinkDest",
-							"Data": "assets/siyuan-128-20210604092437-7iqzf90.png"
-						},
-						{
-							"Type": "NodeCloseParen"
-						}
-					]
-				},
-				{
-					"Type": "NodeText",
-					"Data": "\n"
-				}
-			]
-		},
 		{
 		{
 			"ID": "20210604225457-qsanq8c",
 			"ID": "20210604225457-qsanq8c",
 			"Type": "NodeHeading",
 			"Type": "NodeHeading",

+ 104 - 109
app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-abz7w6k/20200825162036-4dx365o.sy

@@ -7,7 +7,7 @@
 		"title": "排版元素",
 		"title": "排版元素",
 		"title-img": "background-color: hsl(2, 57%, 40%);background-image: repeating-linear-gradient(transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(270deg, transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(125deg, transparent, transparent 2px, rgba(0,0,0,.2) 2px, rgba(0,0,0,.2) 3px, transparent 3px, transparent 5px, rgba(0,0,0,.2) 5px);",
 		"title-img": "background-color: hsl(2, 57%, 40%);background-image: repeating-linear-gradient(transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(270deg, transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(125deg, transparent, transparent 2px, rgba(0,0,0,.2) 2px, rgba(0,0,0,.2) 3px, transparent 3px, transparent 5px, rgba(0,0,0,.2) 5px);",
 		"type": "doc",
 		"type": "doc",
-		"updated": "20220908200902"
+		"updated": "20210604222204"
 	},
 	},
 	"Children": [
 	"Children": [
 		{
 		{
@@ -16,12 +16,12 @@
 			"HeadingLevel": 2,
 			"HeadingLevel": 2,
 			"Properties": {
 			"Properties": {
 				"id": "20210604182832-nm3hapx",
 				"id": "20210604182832-nm3hapx",
-				"updated": "20210604183630"
+				"updated": "20220916194920"
 			},
 			},
 			"Children": [
 			"Children": [
 				{
 				{
 					"Type": "NodeText",
 					"Type": "NodeText",
-					"Data": "行元素"
+					"Data": "行元素"
 				}
 				}
 			]
 			]
 		},
 		},
@@ -31,7 +31,7 @@
 			"ListData": {},
 			"ListData": {},
 			"Properties": {
 			"Properties": {
 				"id": "20210104091228-ttcj9nm",
 				"id": "20210104091228-ttcj9nm",
-				"updated": "20220521234027"
+				"updated": "20210604222204"
 			},
 			},
 			"Children": [
 			"Children": [
 				{
 				{
@@ -55,33 +55,11 @@
 							},
 							},
 							"Children": [
 							"Children": [
 								{
 								{
-									"Type": "NodeBlockRef",
-									"Data": "span",
-									"Children": [
-										{
-											"Type": "NodeOpenParen"
-										},
-										{
-											"Type": "NodeOpenParen"
-										},
-										{
-											"Type": "NodeBlockRefID",
-											"Data": "20200812220555-lj3enxa"
-										},
-										{
-											"Type": "NodeBlockRefSpace"
-										},
-										{
-											"Type": "NodeBlockRefText",
-											"Data": "请从这里开始"
-										},
-										{
-											"Type": "NodeCloseParen"
-										},
-										{
-											"Type": "NodeCloseParen"
-										}
-									]
+									"Type": "NodeTextMark",
+									"TextMarkType": "block-ref",
+									"TextMarkBlockRefID": "20200812220555-lj3enxa",
+									"TextMarkBlockRefSubtype": "s",
+									"TextMarkTextContent": "请从这里开始"
 								}
 								}
 							]
 							]
 						}
 						}
@@ -112,10 +90,97 @@
 									"TextMarkType": "a",
 									"TextMarkType": "a",
 									"TextMarkAHref": "https://ld246.com",
 									"TextMarkAHref": "https://ld246.com",
 									"TextMarkTextContent": "超级链接"
 									"TextMarkTextContent": "超级链接"
+								}
+							]
+						}
+					]
+				},
+				{
+					"ID": "20220916195046-bdzv6fy",
+					"Type": "NodeListItem",
+					"ListData": {
+						"BulletChar": 42,
+						"Marker": "Kg=="
+					},
+					"Properties": {
+						"id": "20220916195046-bdzv6fy",
+						"updated": "20210604222204"
+					},
+					"Children": [
+						{
+							"ID": "20220916195046-oy8nve3",
+							"Type": "NodeParagraph",
+							"Properties": {
+								"id": "20220916195046-oy8nve3",
+								"updated": "20220916195047"
+							},
+							"Children": [
+								{
+									"Type": "NodeText",
+									"Data": "图片"
+								}
+							]
+						},
+						{
+							"ID": "20210604222221-9zkgkky",
+							"Type": "NodeParagraph",
+							"Properties": {
+								"id": "20210604222221-9zkgkky",
+								"updated": "20220916195051"
+							},
+							"Children": [
+								{
+									"Type": "NodeText",
+									"Data": "可通过复制粘贴或拖拽来上传图片;上传后的图片可通过拖拽进行大小调整。"
+								}
+							]
+						},
+						{
+							"ID": "20210604222158-w17nnmy",
+							"Type": "NodeParagraph",
+							"Properties": {
+								"id": "20210604222158-w17nnmy",
+								"updated": "20210604222204"
+							},
+							"Children": [
+								{
+									"Type": "NodeImage",
+									"Data": "span",
+									"Properties": {
+										"style": "display: block;"
+									},
+									"Children": [
+										{
+											"Type": "NodeBang"
+										},
+										{
+											"Type": "NodeOpenBracket"
+										},
+										{
+											"Type": "NodeLinkText"
+										},
+										{
+											"Type": "NodeCloseBracket"
+										},
+										{
+											"Type": "NodeOpenParen"
+										},
+										{
+											"Type": "NodeLinkDest",
+											"Data": "assets/siyuan-128-20210604092205-djd749a.png"
+										},
+										{
+											"Type": "NodeCloseParen"
+										}
+									]
 								},
 								},
 								{
 								{
-									"Type": "NodeBr",
-									"Data": "br"
+									"Type": "NodeKramdownSpanIAL",
+									"Data": "{: style=\"display: block;\"}"
+								},
+								{
+									"Type": "NodeText",
+									"Data": "\n"
 								}
 								}
 							]
 							]
 						}
 						}
@@ -399,13 +464,13 @@
 							"Type": "NodeParagraph",
 							"Type": "NodeParagraph",
 							"Properties": {
 							"Properties": {
 								"id": "20210201202130-085324n",
 								"id": "20210201202130-085324n",
-								"updated": "20210604221052"
+								"updated": "20220916195010"
 							},
 							},
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "code",
 									"TextMarkType": "code",
-									"TextMarkTextContent": "行代码"
+									"TextMarkTextContent": "行代码"
 								}
 								}
 							]
 							]
 						}
 						}
@@ -435,6 +500,10 @@
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "inline-math",
 									"TextMarkType": "inline-math",
 									"TextMarkInlineMathContent": "a^2 + b^2 = \\color{red}c^2"
 									"TextMarkInlineMathContent": "a^2 + b^2 = \\color{red}c^2"
+								},
+								{
+									"Type": "NodeText",
+									"Data": "\n"
 								}
 								}
 							]
 							]
 						}
 						}
@@ -749,80 +818,6 @@
 				}
 				}
 			]
 			]
 		},
 		},
-		{
-			"ID": "20210104091228-lft5b4z",
-			"Type": "NodeHeading",
-			"HeadingLevel": 2,
-			"Properties": {
-				"id": "20210104091228-lft5b4z",
-				"updated": "20210604222220"
-			},
-			"Children": [
-				{
-					"Type": "NodeText",
-					"Data": "图片 "
-				}
-			]
-		},
-		{
-			"ID": "20210604222221-9zkgkky",
-			"Type": "NodeParagraph",
-			"Properties": {
-				"id": "20210604222221-9zkgkky",
-				"updated": "20210604222341"
-			},
-			"Children": [
-				{
-					"Type": "NodeText",
-					"Data": "可通过复制粘贴或拖拽来上传图片;上传后的图片可通过拖拽进行大小调整。"
-				}
-			]
-		},
-		{
-			"ID": "20210604222158-w17nnmy",
-			"Type": "NodeParagraph",
-			"Properties": {
-				"id": "20210604222158-w17nnmy",
-				"updated": "20210604222204"
-			},
-			"Children": [
-				{
-					"Type": "NodeImage",
-					"Data": "span",
-					"Properties": {
-						"style": "display: block;"
-					},
-					"Children": [
-						{
-							"Type": "NodeBang"
-						},
-						{
-							"Type": "NodeOpenBracket"
-						},
-						{
-							"Type": "NodeLinkText"
-						},
-						{
-							"Type": "NodeCloseBracket"
-						},
-						{
-							"Type": "NodeOpenParen"
-						},
-						{
-							"Type": "NodeLinkDest",
-							"Data": "assets/siyuan-128-20210604092205-djd749a.png"
-						},
-						{
-							"Type": "NodeCloseParen"
-						}
-					]
-				},
-				{
-					"Type": "NodeText",
-					"Data": "\n"
-				}
-			]
-		},
 		{
 		{
 			"ID": "20210604183450-fybakeg",
 			"ID": "20210604183450-fybakeg",
 			"Type": "NodeHeading",
 			"Type": "NodeHeading",

+ 24 - 13
app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-abz7w6k/20220628204444-9n0y9h2.sy

@@ -5,7 +5,7 @@
 	"Properties": {
 	"Properties": {
 		"id": "20220628204444-9n0y9h2",
 		"id": "20220628204444-9n0y9h2",
 		"title": "优化排版",
 		"title": "优化排版",
-		"updated": "20220630211109"
+		"updated": "20220916195228"
 	},
 	},
 	"Children": [
 	"Children": [
 		{
 		{
@@ -38,15 +38,21 @@
 			"Type": "NodeParagraph",
 			"Type": "NodeParagraph",
 			"Properties": {
 			"Properties": {
 				"id": "20220628204604-qom7yyl",
 				"id": "20220628204604-qom7yyl",
-				"updated": "20220628205230"
+				"updated": "20220916195228"
 			},
 			},
 			"Children": [
 			"Children": [
 				{
 				{
 					"Type": "NodeText",
 					"Type": "NodeText",
-					"Data": "为了快速记录内容,我们时常会忽略一些排版细节,比如行内代码前后或者加粗前后缺少空格、中文和西文之间缺少空格。",
-					"Properties": {
-						"id": ""
-					}
+					"Data": "为了快速记录内容,我们时常会忽略一些排版细节,比如"
+				},
+				{
+					"Type": "NodeTextMark",
+					"TextMarkType": "search-mark",
+					"TextMarkTextContent": "行"
+				},
+				{
+					"Type": "NodeText",
+					"Data": "级代码前后或者加粗前后缺少空格、中文和西文之间缺少空格。"
 				}
 				}
 			]
 			]
 		},
 		},
@@ -142,7 +148,7 @@
 			"ListData": {},
 			"ListData": {},
 			"Properties": {
 			"Properties": {
 				"id": "20220628205832-odovge3",
 				"id": "20220628205832-odovge3",
-				"updated": "20220628210303"
+				"updated": "20220916195220"
 			},
 			},
 			"Children": [
 			"Children": [
 				{
 				{
@@ -154,7 +160,7 @@
 					},
 					},
 					"Properties": {
 					"Properties": {
 						"id": "20220628205833-kmfuhsp",
 						"id": "20220628205833-kmfuhsp",
-						"updated": "20220628205833"
+						"updated": "20220916195218"
 					},
 					},
 					"Children": [
 					"Children": [
 						{
 						{
@@ -162,12 +168,17 @@
 							"Type": "NodeParagraph",
 							"Type": "NodeParagraph",
 							"Properties": {
 							"Properties": {
 								"id": "20220628205833-iu4yxrq",
 								"id": "20220628205833-iu4yxrq",
-								"updated": "20220628205855"
+								"updated": "20220916195218"
 							},
 							},
 							"Children": [
 							"Children": [
+								{
+									"Type": "NodeTextMark",
+									"TextMarkType": "search-mark",
+									"TextMarkTextContent": "行"
+								},
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "行内代码"
+									"Data": "代码"
 								}
 								}
 							]
 							]
 						}
 						}
@@ -182,7 +193,7 @@
 					},
 					},
 					"Properties": {
 					"Properties": {
 						"id": "20220628205855-jp2ks1q",
 						"id": "20220628205855-jp2ks1q",
-						"updated": "20220628210128"
+						"updated": "20220916195220"
 					},
 					},
 					"Children": [
 					"Children": [
 						{
 						{
@@ -190,12 +201,12 @@
 							"Type": "NodeParagraph",
 							"Type": "NodeParagraph",
 							"Properties": {
 							"Properties": {
 								"id": "20220628205855-1gfuu51",
 								"id": "20220628205855-1gfuu51",
-								"updated": "20220628210245"
+								"updated": "20220916195220"
 							},
 							},
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "行公式"
+									"Data": "行公式"
 								}
 								}
 							]
 							]
 						}
 						}

+ 15 - 10
app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy

@@ -7,7 +7,7 @@
 		"id": "20200813004551-gm0pbn1",
 		"id": "20200813004551-gm0pbn1",
 		"title": "快捷键",
 		"title": "快捷键",
 		"type": "doc",
 		"type": "doc",
-		"updated": "20220904093144"
+		"updated": "20220916195306"
 	},
 	},
 	"Children": [
 	"Children": [
 		{
 		{
@@ -1657,7 +1657,7 @@
 			"Properties": {
 			"Properties": {
 				"colgroup": "||",
 				"colgroup": "||",
 				"id": "20201227133317-vopotjc",
 				"id": "20201227133317-vopotjc",
-				"updated": "20220904093101"
+				"updated": "20220916195306"
 			},
 			},
 			"Children": [
 			"Children": [
 				{
 				{
@@ -4056,7 +4056,7 @@
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "光标在行元素中唤起对应的功能菜单,否则唤起块菜单"
+									"Data": "光标在行元素中唤起对应的功能菜单,否则唤起块菜单"
 								}
 								}
 							]
 							]
 						}
 						}
@@ -4129,7 +4129,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "Ctrl+Shift+\u003e"
+									"TextMarkTextContent": "Ctrl+Shift+\u0026gt;"
 								},
 								},
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
@@ -4138,7 +4138,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "⇧⌘\u003e"
+									"TextMarkTextContent": "⇧⌘\u0026gt;"
 								}
 								}
 							]
 							]
 						},
 						},
@@ -4551,7 +4551,7 @@
 			"Properties": {
 			"Properties": {
 				"colgroup": "||",
 				"colgroup": "||",
 				"id": "20210102174148-snb76bj",
 				"id": "20210102174148-snb76bj",
-				"updated": "20220618235728"
+				"updated": "20220916195234"
 			},
 			},
 			"Children": [
 			"Children": [
 				{
 				{
@@ -4974,7 +4974,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "Ctrl+'"
+									"TextMarkTextContent": "Ctrl+\u0026apos;"
 								},
 								},
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
@@ -4983,7 +4983,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "⌘'"
+									"TextMarkTextContent": "⌘\u0026apos;"
 								}
 								}
 							]
 							]
 						},
 						},
@@ -5041,9 +5041,14 @@
 							"Type": "NodeTableCell",
 							"Type": "NodeTableCell",
 							"Data": "td",
 							"Data": "td",
 							"Children": [
 							"Children": [
+								{
+									"Type": "NodeTextMark",
+									"TextMarkType": "search-mark",
+									"TextMarkTextContent": "行"
+								},
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "行内数学公式"
+									"Data": "数学公式"
 								}
 								}
 							]
 							]
 						},
 						},
@@ -5255,7 +5260,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "\u003e"
+									"TextMarkTextContent": "\u0026gt;"
 								}
 								}
 							]
 							]
 						},
 						},

+ 103 - 112
app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120854-dr1jfx2/20211226121319-emrk2yy.sy

@@ -6,7 +6,7 @@
 		"id": "20211226121319-emrk2yy",
 		"id": "20211226121319-emrk2yy",
 		"title": "排版元素",
 		"title": "排版元素",
 		"title-img": "background-color: hsl(2, 57%, 40%);background-image: repeating-linear-gradient(transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(270deg, transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(125deg, transparent, transparent 2px, rgba(0,0,0,.2) 2px, rgba(0,0,0,.2) 3px, transparent 3px, transparent 5px, rgba(0,0,0,.2) 5px);",
 		"title-img": "background-color: hsl(2, 57%, 40%);background-image: repeating-linear-gradient(transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(270deg, transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(125deg, transparent, transparent 2px, rgba(0,0,0,.2) 2px, rgba(0,0,0,.2) 3px, transparent 3px, transparent 5px, rgba(0,0,0,.2) 5px);",
-		"updated": "20220909095422"
+		"updated": "20220916195925"
 	},
 	},
 	"Children": [
 	"Children": [
 		{
 		{
@@ -15,12 +15,12 @@
 			"HeadingLevel": 2,
 			"HeadingLevel": 2,
 			"Properties": {
 			"Properties": {
 				"id": "20211226122008-i45akvs",
 				"id": "20211226122008-i45akvs",
-				"updated": "20211226122008"
+				"updated": "20220916195925"
 			},
 			},
 			"Children": [
 			"Children": [
 				{
 				{
 					"Type": "NodeText",
 					"Type": "NodeText",
-					"Data": "行元素"
+					"Data": "行元素"
 				}
 				}
 			]
 			]
 		},
 		},
@@ -30,7 +30,7 @@
 			"ListData": {},
 			"ListData": {},
 			"Properties": {
 			"Properties": {
 				"id": "20211226122008-1e014nh",
 				"id": "20211226122008-1e014nh",
-				"updated": "20220521234434"
+				"updated": "20220916195740"
 			},
 			},
 			"Children": [
 			"Children": [
 				{
 				{
@@ -54,33 +54,11 @@
 							},
 							},
 							"Children": [
 							"Children": [
 								{
 								{
-									"Type": "NodeBlockRef",
-									"Data": "span",
-									"Children": [
-										{
-											"Type": "NodeOpenParen"
-										},
-										{
-											"Type": "NodeOpenParen"
-										},
-										{
-											"Type": "NodeBlockRefID",
-											"Data": "20211226115423-d5z1joq"
-										},
-										{
-											"Type": "NodeBlockRefSpace"
-										},
-										{
-											"Type": "NodeBlockRefText",
-											"Data": "請從這裡開始"
-										},
-										{
-											"Type": "NodeCloseParen"
-										},
-										{
-											"Type": "NodeCloseParen"
-										}
-									]
+									"Type": "NodeTextMark",
+									"TextMarkType": "block-ref",
+									"TextMarkBlockRefID": "20211226115423-d5z1joq",
+									"TextMarkBlockRefSubtype": "s",
+									"TextMarkTextContent": "請從這裡開始"
 								}
 								}
 							]
 							]
 						}
 						}
@@ -116,6 +94,97 @@
 						}
 						}
 					]
 					]
 				},
 				},
+				{
+					"ID": "20220916195409-g57vfyf",
+					"Type": "NodeListItem",
+					"ListData": {
+						"BulletChar": 42,
+						"Marker": "Kg=="
+					},
+					"Properties": {
+						"id": "20220916195409-g57vfyf",
+						"updated": "20211226122008"
+					},
+					"Children": [
+						{
+							"ID": "20220916195414-a5jqqzy",
+							"Type": "NodeParagraph",
+							"Properties": {
+								"id": "20220916195414-a5jqqzy",
+								"updated": "20220916195414"
+							},
+							"Children": [
+								{
+									"Type": "NodeText",
+									"Data": "圖片"
+								}
+							]
+						},
+						{
+							"ID": "20211226122008-pei037e",
+							"Type": "NodeParagraph",
+							"Properties": {
+								"id": "20211226122008-pei037e",
+								"updated": "20220916195424"
+							},
+							"Children": [
+								{
+									"Type": "NodeText",
+									"Data": "可通過複制貼上或拖拽來上傳圖片;上傳後的圖片可通過拖拽進行大小調整。"
+								}
+							]
+						},
+						{
+							"ID": "20211226122008-poajwbi",
+							"Type": "NodeParagraph",
+							"Properties": {
+								"id": "20211226122008-poajwbi",
+								"updated": "20210604222204"
+							},
+							"Children": [
+								{
+									"Type": "NodeImage",
+									"Data": "span",
+									"Properties": {
+										"style": "display: block;"
+									},
+									"Children": [
+										{
+											"Type": "NodeBang"
+										},
+										{
+											"Type": "NodeOpenBracket"
+										},
+										{
+											"Type": "NodeLinkText"
+										},
+										{
+											"Type": "NodeCloseBracket"
+										},
+										{
+											"Type": "NodeOpenParen"
+										},
+										{
+											"Type": "NodeLinkDest",
+											"Data": "assets/siyuan-128-20210604092205-djd749a.png"
+										},
+										{
+											"Type": "NodeCloseParen"
+										}
+									]
+								},
+								{
+									"Type": "NodeKramdownSpanIAL",
+									"Data": "{: style=\"display: block;\"}"
+								},
+								{
+									"Type": "NodeText",
+									"Data": "\n"
+								}
+							]
+						}
+					]
+				},
 				{
 				{
 					"ID": "20211226122008-aswl5xl",
 					"ID": "20211226122008-aswl5xl",
 					"Type": "NodeListItem",
 					"Type": "NodeListItem",
@@ -390,7 +459,7 @@
 					},
 					},
 					"Properties": {
 					"Properties": {
 						"id": "20211226122008-dwvi51s",
 						"id": "20211226122008-dwvi51s",
-						"updated": "20211226122008"
+						"updated": "20220916195740"
 					},
 					},
 					"Children": [
 					"Children": [
 						{
 						{
@@ -398,13 +467,13 @@
 							"Type": "NodeParagraph",
 							"Type": "NodeParagraph",
 							"Properties": {
 							"Properties": {
 								"id": "20211226122008-f8vr0tu",
 								"id": "20211226122008-f8vr0tu",
-								"updated": "20211226122008"
+								"updated": "20220916195740"
 							},
 							},
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "code",
 									"TextMarkType": "code",
-									"TextMarkTextContent": "行代碼"
+									"TextMarkTextContent": "行代碼"
 								}
 								}
 							]
 							]
 						}
 						}
@@ -748,84 +817,6 @@
 				}
 				}
 			]
 			]
 		},
 		},
-		{
-			"ID": "20211226122008-s3rfg01",
-			"Type": "NodeHeading",
-			"HeadingLevel": 2,
-			"Properties": {
-				"id": "20211226122008-s3rfg01",
-				"updated": "20211226122008"
-			},
-			"Children": [
-				{
-					"Type": "NodeText",
-					"Data": "圖片"
-				}
-			]
-		},
-		{
-			"ID": "20211226122008-pei037e",
-			"Type": "NodeParagraph",
-			"Properties": {
-				"id": "20211226122008-pei037e",
-				"updated": "20211226002011"
-			},
-			"Children": [
-				{
-					"Type": "NodeText",
-					"Data": "可通過複制貼上或拖拽來上傳圖片;上傳後的圖片可通過拖拽進行大小調整。"
-				}
-			]
-		},
-		{
-			"ID": "20211226122008-poajwbi",
-			"Type": "NodeParagraph",
-			"Properties": {
-				"id": "20211226122008-poajwbi",
-				"updated": "20210604222204"
-			},
-			"Children": [
-				{
-					"Type": "NodeImage",
-					"Data": "span",
-					"Properties": {
-						"style": "display: block;"
-					},
-					"Children": [
-						{
-							"Type": "NodeBang"
-						},
-						{
-							"Type": "NodeOpenBracket"
-						},
-						{
-							"Type": "NodeLinkText"
-						},
-						{
-							"Type": "NodeCloseBracket"
-						},
-						{
-							"Type": "NodeOpenParen"
-						},
-						{
-							"Type": "NodeLinkDest",
-							"Data": "assets/siyuan-128-20210604092205-djd749a.png"
-						},
-						{
-							"Type": "NodeCloseParen"
-						}
-					]
-				},
-				{
-					"Type": "NodeKramdownSpanIAL",
-					"Data": "{: style=\"display: block;\"}"
-				},
-				{
-					"Type": "NodeText",
-					"Data": "\n"
-				}
-			]
-		},
 		{
 		{
 			"ID": "20211226122008-nufcprx",
 			"ID": "20211226122008-nufcprx",
 			"Type": "NodeHeading",
 			"Type": "NodeHeading",

+ 10 - 10
app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120854-dr1jfx2/20220628204420-ui79vkt.sy

@@ -5,7 +5,7 @@
 	"Properties": {
 	"Properties": {
 		"id": "20220628204420-ui79vkt",
 		"id": "20220628204420-ui79vkt",
 		"title": "優化排版",
 		"title": "優化排版",
-		"updated": "20220630211154"
+		"updated": "20220916195825"
 	},
 	},
 	"Children": [
 	"Children": [
 		{
 		{
@@ -28,12 +28,12 @@
 			"Type": "NodeParagraph",
 			"Type": "NodeParagraph",
 			"Properties": {
 			"Properties": {
 				"id": "20220628215506-karsxdt",
 				"id": "20220628215506-karsxdt",
-				"updated": "20220628215506"
+				"updated": "20220916195825"
 			},
 			},
 			"Children": [
 			"Children": [
 				{
 				{
 					"Type": "NodeText",
 					"Type": "NodeText",
-					"Data": "為了快速記錄內容,我們時常會忽略一些排版細節,比如行代碼前後或者加粗前後缺少空格、中文和西文之間缺少空格。"
+					"Data": "為了快速記錄內容,我們時常會忽略一些排版細節,比如行代碼前後或者加粗前後缺少空格、中文和西文之間缺少空格。"
 				}
 				}
 			]
 			]
 		},
 		},
@@ -104,7 +104,7 @@
 			"ListData": {},
 			"ListData": {},
 			"Properties": {
 			"Properties": {
 				"id": "20220628215506-srlvfe0",
 				"id": "20220628215506-srlvfe0",
-				"updated": "20220628215506"
+				"updated": "20220916195816"
 			},
 			},
 			"Children": [
 			"Children": [
 				{
 				{
@@ -116,7 +116,7 @@
 					},
 					},
 					"Properties": {
 					"Properties": {
 						"id": "20220628215506-tfhl45j",
 						"id": "20220628215506-tfhl45j",
-						"updated": "20220628215506"
+						"updated": "20220916195816"
 					},
 					},
 					"Children": [
 					"Children": [
 						{
 						{
@@ -124,12 +124,12 @@
 							"Type": "NodeParagraph",
 							"Type": "NodeParagraph",
 							"Properties": {
 							"Properties": {
 								"id": "20220628215506-c6atyjn",
 								"id": "20220628215506-c6atyjn",
-								"updated": "20220628215506"
+								"updated": "20220916195816"
 							},
 							},
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "行代碼"
+									"Data": "行代碼"
 								}
 								}
 							]
 							]
 						}
 						}
@@ -144,7 +144,7 @@
 					},
 					},
 					"Properties": {
 					"Properties": {
 						"id": "20220628215506-258fpgt",
 						"id": "20220628215506-258fpgt",
-						"updated": "20220628215506"
+						"updated": "20220916195814"
 					},
 					},
 					"Children": [
 					"Children": [
 						{
 						{
@@ -152,12 +152,12 @@
 							"Type": "NodeParagraph",
 							"Type": "NodeParagraph",
 							"Properties": {
 							"Properties": {
 								"id": "20220628215506-3twrnze",
 								"id": "20220628215506-3twrnze",
-								"updated": "20220628215506"
+								"updated": "20220916195814"
 							},
 							},
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "行公式"
+									"Data": "行公式"
 								}
 								}
 							]
 							]
 						}
 						}

+ 16 - 16
app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy

@@ -6,7 +6,7 @@
 		"icon": "2328",
 		"icon": "2328",
 		"id": "20211226122549-jktxego",
 		"id": "20211226122549-jktxego",
 		"title": "快捷鍵",
 		"title": "快捷鍵",
-		"updated": "20220904093830"
+		"updated": "20220916195834"
 	},
 	},
 	"Children": [
 	"Children": [
 		{
 		{
@@ -1645,7 +1645,7 @@
 			"Properties": {
 			"Properties": {
 				"colgroup": "||",
 				"colgroup": "||",
 				"id": "20211226122652-pb50zx4",
 				"id": "20211226122652-pb50zx4",
-				"updated": "20220904093734"
+				"updated": "20220916195834"
 			},
 			},
 			"Children": [
 			"Children": [
 				{
 				{
@@ -4048,7 +4048,7 @@
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "光標在行元素中喚起對應的功能菜單,否則喚起塊菜單"
+									"Data": "光標在行元素中喚起對應的功能菜單,否則喚起塊菜單"
 								},
 								},
 								{
 								{
 									"Type": "NodeBr",
 									"Type": "NodeBr",
@@ -4133,7 +4133,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "Ctrl+Shift+\u003e"
+									"TextMarkTextContent": "Ctrl+Shift+\u0026gt;"
 								},
 								},
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
@@ -4142,7 +4142,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "⇧⌘\u003e"
+									"TextMarkTextContent": "⇧⌘\u0026gt;"
 								}
 								}
 							]
 							]
 						},
 						},
@@ -4289,7 +4289,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "設置-\u003e快捷鍵"
+									"TextMarkTextContent": "設置-\u0026gt;快捷鍵"
 								},
 								},
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
@@ -4334,7 +4334,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "設置-\u003e快捷鍵"
+									"TextMarkTextContent": "設置-\u0026gt;快捷鍵"
 								},
 								},
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
@@ -4379,7 +4379,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "設置-\u003e快捷鍵"
+									"TextMarkTextContent": "設置-\u0026gt;快捷鍵"
 								},
 								},
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
@@ -4424,7 +4424,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "設置-\u003e快捷鍵"
+									"TextMarkTextContent": "設置-\u0026gt;快捷鍵"
 								},
 								},
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
@@ -4469,7 +4469,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "設置-\u003e快捷鍵"
+									"TextMarkTextContent": "設置-\u0026gt;快捷鍵"
 								},
 								},
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
@@ -4514,7 +4514,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "設置-\u003e快捷鍵"
+									"TextMarkTextContent": "設置-\u0026gt;快捷鍵"
 								},
 								},
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
@@ -4552,7 +4552,7 @@
 			"Properties": {
 			"Properties": {
 				"colgroup": "||",
 				"colgroup": "||",
 				"id": "20211226122652-v6as45b",
 				"id": "20211226122652-v6as45b",
-				"updated": "20220518105130"
+				"updated": "20220916195647"
 			},
 			},
 			"Children": [
 			"Children": [
 				{
 				{
@@ -4975,7 +4975,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "Ctrl+'"
+									"TextMarkTextContent": "Ctrl+\u0026apos;"
 								},
 								},
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
@@ -4984,7 +4984,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "⌘'"
+									"TextMarkTextContent": "⌘\u0026apos;"
 								}
 								}
 							]
 							]
 						},
 						},
@@ -5044,7 +5044,7 @@
 							"Children": [
 							"Children": [
 								{
 								{
 									"Type": "NodeText",
 									"Type": "NodeText",
-									"Data": "行數學公式"
+									"Data": "行數學公式"
 								}
 								}
 							]
 							]
 						},
 						},
@@ -5277,7 +5277,7 @@
 								{
 								{
 									"Type": "NodeTextMark",
 									"Type": "NodeTextMark",
 									"TextMarkType": "kbd",
 									"TextMarkType": "kbd",
-									"TextMarkTextContent": "\u003e"
+									"TextMarkTextContent": "\u0026gt;"
 								}
 								}
 							]
 							]
 						},
 						},

文件差异内容过多而无法显示
+ 0 - 0
app/stage/protyle/js/lute/lute.min.js


+ 1 - 1
kernel/api/filetree.go

@@ -55,7 +55,7 @@ func refreshFiletree(c *gin.Context) {
 	ret := gulu.Ret.NewResult()
 	ret := gulu.Ret.NewResult()
 	defer c.JSON(http.StatusOK, ret)
 	defer c.JSON(http.StatusOK, ret)
 
 
-	model.RefreshFileTree()
+	model.FullReindex()
 }
 }
 
 
 func doc2Heading(c *gin.Context) {
 func doc2Heading(c *gin.Context) {

+ 1 - 1
kernel/api/setting.go

@@ -213,7 +213,7 @@ func setSearch(c *gin.Context) {
 	model.Conf.Save()
 	model.Conf.Save()
 	sql.SetCaseSensitive(s.CaseSensitive)
 	sql.SetCaseSensitive(s.CaseSensitive)
 	if s.CaseSensitive != oldCaseSensitive {
 	if s.CaseSensitive != oldCaseSensitive {
-		model.RefreshFileTree()
+		model.FullReindex()
 	}
 	}
 	sql.ClearVirtualRefKeywords()
 	sql.ClearVirtualRefKeywords()
 	ret.Data = s
 	ret.Data = s

+ 1 - 1
kernel/go.mod

@@ -7,7 +7,7 @@ require (
 	github.com/88250/css v0.1.2
 	github.com/88250/css v0.1.2
 	github.com/88250/flock v0.8.2
 	github.com/88250/flock v0.8.2
 	github.com/88250/gulu v1.2.3-0.20220916075322-eb117059d70a
 	github.com/88250/gulu v1.2.3-0.20220916075322-eb117059d70a
-	github.com/88250/lute v1.7.5-0.20220916031248-441b66b72883
+	github.com/88250/lute v1.7.5-0.20220916090743-91ee79ea1ba7
 	github.com/88250/pdfcpu v0.3.13
 	github.com/88250/pdfcpu v0.3.13
 	github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
 	github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
 	github.com/ConradIrwin/font v0.0.0-20210318200717-ce8d41cc0732
 	github.com/ConradIrwin/font v0.0.0-20210318200717-ce8d41cc0732

+ 2 - 2
kernel/go.sum

@@ -19,8 +19,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20220714142610-fbbda1ee84f5 h1:8HdZozCsXS
 github.com/88250/go-sqlite3 v1.14.13-0.20220714142610-fbbda1ee84f5/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
 github.com/88250/go-sqlite3 v1.14.13-0.20220714142610-fbbda1ee84f5/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
 github.com/88250/gulu v1.2.3-0.20220916075322-eb117059d70a h1:qQdnk8clbgA+MXtf5bXOTOby32iQYjqMOn6oBIMV/Tk=
 github.com/88250/gulu v1.2.3-0.20220916075322-eb117059d70a h1:qQdnk8clbgA+MXtf5bXOTOby32iQYjqMOn6oBIMV/Tk=
 github.com/88250/gulu v1.2.3-0.20220916075322-eb117059d70a/go.mod h1:I1qBzsksFL2ciGSuqDE7R3XW4BUMrfDgOvSXEk7FsAI=
 github.com/88250/gulu v1.2.3-0.20220916075322-eb117059d70a/go.mod h1:I1qBzsksFL2ciGSuqDE7R3XW4BUMrfDgOvSXEk7FsAI=
-github.com/88250/lute v1.7.5-0.20220916031248-441b66b72883 h1:7uCW8I6P5934DhzUpJmZcaanRl8ws+X76sw4uca4gRM=
-github.com/88250/lute v1.7.5-0.20220916031248-441b66b72883/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=
+github.com/88250/lute v1.7.5-0.20220916090743-91ee79ea1ba7 h1:ddXXCU+Np3iJoFV34NShb/NwaSrnG+9ZGonxd5SdJow=
+github.com/88250/lute v1.7.5-0.20220916090743-91ee79ea1ba7/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=
 github.com/88250/pdfcpu v0.3.13 h1:touMWMZkCGalMIbEg9bxYp7rETM+zwb9hXjwhqi4I7Q=
 github.com/88250/pdfcpu v0.3.13 h1:touMWMZkCGalMIbEg9bxYp7rETM+zwb9hXjwhqi4I7Q=
 github.com/88250/pdfcpu v0.3.13/go.mod h1:S5YT38L/GCjVjmB4PB84PymA1qfopjEhfhTNQilLpv4=
 github.com/88250/pdfcpu v0.3.13/go.mod h1:S5YT38L/GCjVjmB4PB84PymA1qfopjEhfhTNQilLpv4=
 github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=
 github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=

+ 2 - 2
kernel/model/box.go

@@ -483,10 +483,10 @@ func ReindexTree(path string) (err error) {
 	return
 	return
 }
 }
 
 
-func RefreshFileTree() {
+func FullReindex() {
+	util.PushEndlessProgress(Conf.Language(35))
 	WaitForWritingFiles()
 	WaitForWritingFiles()
 
 
-	util.PushEndlessProgress(Conf.Language(35))
 	if err := sql.InitDatabase(true); nil != err {
 	if err := sql.InitDatabase(true); nil != err {
 		util.PushErrMsg(fmt.Sprintf(Conf.Language(85), err), 5000)
 		util.PushErrMsg(fmt.Sprintf(Conf.Language(85), err), 5000)
 		return
 		return

+ 14 - 21
kernel/model/export.go

@@ -1117,27 +1117,22 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros bool) (ret *parse.T
 			return ast.WalkSkipChildren
 			return ast.WalkSkipChildren
 		}
 		}
 
 
-		if ast.NodeBlockRef != n.Type {
+		if !treenode.IsBlockRef(n) {
 			return ast.WalkContinue
 			return ast.WalkContinue
 		}
 		}
 
 
 		// 处理引用节点
 		// 处理引用节点
 
 
-		var linkText string
-		id := n.ChildByType(ast.NodeBlockRefID).TokensStr()
-		if anchor := n.ChildByType(ast.NodeBlockRefText); nil != anchor {
-			linkText = anchor.Text()
-		} else if anchor = n.ChildByType(ast.NodeBlockRefDynamicText); nil != anchor {
-			linkText = anchor.Text()
-		} else {
-			linkText = sql.GetRefText(id)
+		defID, linkText, _ := treenode.GetBlockRef(n)
+		if "" == linkText {
+			linkText = sql.GetRefText(defID)
 		}
 		}
 		if Conf.Editor.BlockRefDynamicAnchorTextMaxLen < utf8.RuneCountInString(linkText) {
 		if Conf.Editor.BlockRefDynamicAnchorTextMaxLen < utf8.RuneCountInString(linkText) {
 			linkText = gulu.Str.SubStr(linkText, Conf.Editor.BlockRefDynamicAnchorTextMaxLen) + "..."
 			linkText = gulu.Str.SubStr(linkText, Conf.Editor.BlockRefDynamicAnchorTextMaxLen) + "..."
 		}
 		}
 		linkText = Conf.Export.BlockRefTextLeft + linkText + Conf.Export.BlockRefTextRight
 		linkText = Conf.Export.BlockRefTextLeft + linkText + Conf.Export.BlockRefTextRight
 
 
-		defTree, _ := loadTreeByBlockID(id)
+		defTree, _ := loadTreeByBlockID(defID)
 		if nil == defTree {
 		if nil == defTree {
 			return ast.WalkContinue
 			return ast.WalkContinue
 		}
 		}
@@ -1150,13 +1145,12 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros bool) (ret *parse.T
 			blockRefLink.AppendChild(&ast.Node{Type: ast.NodeLinkText, Tokens: []byte(linkText)})
 			blockRefLink.AppendChild(&ast.Node{Type: ast.NodeLinkText, Tokens: []byte(linkText)})
 			blockRefLink.AppendChild(&ast.Node{Type: ast.NodeCloseBracket})
 			blockRefLink.AppendChild(&ast.Node{Type: ast.NodeCloseBracket})
 			blockRefLink.AppendChild(&ast.Node{Type: ast.NodeOpenParen})
 			blockRefLink.AppendChild(&ast.Node{Type: ast.NodeOpenParen})
-			blockRefLink.AppendChild(&ast.Node{Type: ast.NodeLinkDest, Tokens: []byte("siyuan://blocks/" + id)})
+			blockRefLink.AppendChild(&ast.Node{Type: ast.NodeLinkDest, Tokens: []byte("siyuan://blocks/" + defID)})
 			blockRefLink.AppendChild(&ast.Node{Type: ast.NodeCloseParen})
 			blockRefLink.AppendChild(&ast.Node{Type: ast.NodeCloseParen})
 			n.InsertBefore(blockRefLink)
 			n.InsertBefore(blockRefLink)
 		case 3: // 仅锚文本
 		case 3: // 仅锚文本
 			n.InsertBefore(&ast.Node{Type: ast.NodeText, Tokens: []byte(linkText)})
 			n.InsertBefore(&ast.Node{Type: ast.NodeText, Tokens: []byte(linkText)})
 		case 4: // 脚注
 		case 4: // 脚注
-			defID := n.ChildByType(ast.NodeBlockRefID).TokensStr()
 			refFoot := getRefAsFootnotes(defID, &refFootnotes)
 			refFoot := getRefAsFootnotes(defID, &refFootnotes)
 			n.InsertBefore(&ast.Node{Type: ast.NodeText, Tokens: []byte(linkText)})
 			n.InsertBefore(&ast.Node{Type: ast.NodeText, Tokens: []byte(linkText)})
 			n.InsertBefore(&ast.Node{Type: ast.NodeFootnotesRef, Tokens: []byte("^" + refFoot.refNum), FootnotesRefId: refFoot.refNum, FootnotesRefLabel: []byte("^" + refFoot.refNum)})
 			n.InsertBefore(&ast.Node{Type: ast.NodeFootnotesRef, Tokens: []byte("^" + refFoot.refNum), FootnotesRefId: refFoot.refNum, FootnotesRefLabel: []byte("^" + refFoot.refNum)})
@@ -1295,8 +1289,8 @@ func resolveFootnotesDefs(refFootnotes *[]*refAsFootnotes, rootID string) (footn
 					return ast.WalkContinue
 					return ast.WalkContinue
 				}
 				}
 
 
-				if ast.NodeBlockRef == n.Type {
-					defID := n.ChildByType(ast.NodeBlockRefID).TokensStr()
+				if treenode.IsBlockRef(n) {
+					defID, _, _ := treenode.GetBlockRef(n)
 					if f := getRefAsFootnotes(defID, refFootnotes); nil != f {
 					if f := getRefAsFootnotes(defID, refFootnotes); nil != f {
 						n.InsertBefore(&ast.Node{Type: ast.NodeText, Tokens: []byte(Conf.Export.BlockRefTextLeft + f.refAnchorText + Conf.Export.BlockRefTextRight)})
 						n.InsertBefore(&ast.Node{Type: ast.NodeText, Tokens: []byte(Conf.Export.BlockRefTextLeft + f.refAnchorText + Conf.Export.BlockRefTextRight)})
 						n.InsertBefore(&ast.Node{Type: ast.NodeFootnotesRef, Tokens: []byte("^" + f.refNum), FootnotesRefId: f.refNum, FootnotesRefLabel: []byte("^" + f.refNum)})
 						n.InsertBefore(&ast.Node{Type: ast.NodeFootnotesRef, Tokens: []byte("^" + f.refNum), FootnotesRefId: f.refNum, FootnotesRefLabel: []byte("^" + f.refNum)})
@@ -1412,8 +1406,8 @@ func collectFootnotesDefs0(node *ast.Node, refFootnotes *[]*refAsFootnotes, tree
 			return ast.WalkContinue
 			return ast.WalkContinue
 		}
 		}
 
 
-		if ast.NodeBlockRef == n.Type {
-			defID := n.ChildByType(ast.NodeBlockRefID).TokensStr()
+		if treenode.IsBlockRef(n) {
+			defID, _, _ := treenode.GetBlockRef(n)
 			if nil == getRefAsFootnotes(defID, refFootnotes) {
 			if nil == getRefAsFootnotes(defID, refFootnotes) {
 				anchorText := sql.GetRefText(defID)
 				anchorText := sql.GetRefText(defID)
 				if Conf.Editor.BlockRefDynamicAnchorTextMaxLen < utf8.RuneCountInString(anchorText) {
 				if Conf.Editor.BlockRefDynamicAnchorTextMaxLen < utf8.RuneCountInString(anchorText) {
@@ -1463,12 +1457,11 @@ func exportRefTrees0(tree *parse.Tree, retTrees *map[string]*parse.Tree) {
 			return ast.WalkContinue
 			return ast.WalkContinue
 		}
 		}
 
 
-		if ast.NodeBlockRef == n.Type {
-			defIDNode := n.ChildByType(ast.NodeBlockRefID)
-			if nil == defIDNode {
-				return ast.WalkSkipChildren
+		if treenode.IsBlockRef(n) {
+			defID, _, _ := treenode.GetBlockRef(n)
+			if "" == defID {
+				return ast.WalkContinue
 			}
 			}
-			defID := defIDNode.TokensStr()
 			defBlock := treenode.GetBlockTree(defID)
 			defBlock := treenode.GetBlockTree(defID)
 			if nil == defBlock {
 			if nil == defBlock {
 				return ast.WalkSkipChildren
 				return ast.WalkSkipChildren

+ 1 - 1
kernel/model/file.go

@@ -637,7 +637,7 @@ func GetDoc(startID, endID, id string, index int, keyword string, mode int, size
 				}
 				}
 			}
 			}
 
 
-			if ast.NodeBlockRef == n.Type {
+			if treenode.IsBlockRef(n) {
 				appendRefTextRenderResultForBlockRef(n)
 				appendRefTextRenderResultForBlockRef(n)
 				return ast.WalkSkipChildren
 				return ast.WalkSkipChildren
 			}
 			}

+ 3 - 3
kernel/model/history.go

@@ -178,7 +178,7 @@ func GetDocHistoryContent(historyPath, keyword string) (id, rootID, content stri
 			n.RemoveIALAttr("heading-fold")
 			n.RemoveIALAttr("heading-fold")
 			n.RemoveIALAttr("fold")
 			n.RemoveIALAttr("fold")
 
 
-			if ast.NodeBlockRef == n.Type {
+			if treenode.IsBlockRef(n) {
 				appendRefTextRenderResultForBlockRef(n)
 				appendRefTextRenderResultForBlockRef(n)
 				return ast.WalkSkipChildren
 				return ast.WalkSkipChildren
 			}
 			}
@@ -266,7 +266,7 @@ func RollbackDocHistory(boxID, historyPath string) (err error) {
 	}
 	}
 	writingDataLock.Unlock()
 	writingDataLock.Unlock()
 
 
-	RefreshFileTree()
+	FullReindex()
 	IncSync()
 	IncSync()
 	return nil
 	return nil
 }
 }
@@ -321,7 +321,7 @@ func RollbackNotebookHistory(historyPath string) (err error) {
 		return
 		return
 	}
 	}
 
 
-	RefreshFileTree()
+	FullReindex()
 	IncSync()
 	IncSync()
 	return nil
 	return nil
 }
 }

+ 13 - 8
kernel/model/import.go

@@ -124,12 +124,17 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
 			if !entering {
 			if !entering {
 				return ast.WalkContinue
 				return ast.WalkContinue
 			}
 			}
-			if ast.NodeBlockRefID == n.Type {
-				newDefID := blockIDs[n.TokensStr()]
+			if treenode.IsBlockRef(n) {
+				defID, _, _ := treenode.GetBlockRef(n)
+				newDefID := blockIDs[defID]
 				if "" != newDefID {
 				if "" != newDefID {
-					n.Tokens = []byte(newDefID)
-				} else {
-					logging.LogWarnf("not found def [" + n.TokensStr() + "]")
+					if ast.NodeBlockRef == n.Type {
+						if id := n.ChildByType(ast.NodeBlockRefID); nil != id {
+							id.Tokens = []byte(newDefID)
+						}
+					} else {
+						n.TextMarkBlockRefID = newDefID
+					}
 				}
 				}
 			} else if ast.NodeBlockQueryEmbedScript == n.Type {
 			} else if ast.NodeBlockQueryEmbedScript == n.Type {
 				for oldID, newID := range blockIDs {
 				for oldID, newID := range blockIDs {
@@ -291,7 +296,7 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
 	}
 	}
 
 
 	IncSync()
 	IncSync()
-	RefreshFileTree()
+	FullReindex()
 	return
 	return
 }
 }
 
 
@@ -338,7 +343,7 @@ func ImportData(zipPath string) (err error) {
 	}
 	}
 
 
 	IncSync()
 	IncSync()
-	RefreshFileTree()
+	FullReindex()
 	return
 	return
 }
 }
 
 
@@ -513,7 +518,7 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
 		}
 		}
 
 
 		IncSync()
 		IncSync()
-		RefreshFileTree()
+		FullReindex()
 	} else { // 导入单个文件
 	} else { // 导入单个文件
 		fileName := filepath.Base(localPath)
 		fileName := filepath.Base(localPath)
 		if !strings.HasSuffix(fileName, ".md") && !strings.HasSuffix(fileName, ".markdown") {
 		if !strings.HasSuffix(fileName, ".md") && !strings.HasSuffix(fileName, ".markdown") {

+ 2 - 2
kernel/model/path.go

@@ -183,7 +183,7 @@ func toSubTree(blocks []*Block, keyword string) (ret []*Path) {
 
 
 				unfold := true
 				unfold := true
 				for liFirstBlockSpan := li.FirstChild.FirstChild; nil != liFirstBlockSpan; liFirstBlockSpan = liFirstBlockSpan.Next {
 				for liFirstBlockSpan := li.FirstChild.FirstChild; nil != liFirstBlockSpan; liFirstBlockSpan = liFirstBlockSpan.Next {
-					if ast.NodeBlockRef == liFirstBlockSpan.Type {
+					if treenode.IsBlockRef(liFirstBlockSpan) {
 						continue
 						continue
 					}
 					}
 					if "" != strings.TrimSpace(liFirstBlockSpan.Text()) {
 					if "" != strings.TrimSpace(liFirstBlockSpan.Text()) {
@@ -278,7 +278,7 @@ func toSubTree(blocks []*Block, keyword string) (ret []*Path) {
 
 
 				unfold := true
 				unfold := true
 				for headingFirstSpan := h.FirstChild; nil != headingFirstSpan; headingFirstSpan = headingFirstSpan.Next {
 				for headingFirstSpan := h.FirstChild; nil != headingFirstSpan; headingFirstSpan = headingFirstSpan.Next {
-					if ast.NodeBlockRef == headingFirstSpan.Type {
+					if treenode.IsBlockRef(headingFirstSpan) {
 						continue
 						continue
 					}
 					}
 					if "" != strings.TrimSpace(headingFirstSpan.Text()) {
 					if "" != strings.TrimSpace(headingFirstSpan.Text()) {

+ 2 - 2
kernel/model/repository.go

@@ -240,7 +240,7 @@ func CheckoutRepo(id string) (err error) {
 		return
 		return
 	}
 	}
 
 
-	RefreshFileTree()
+	FullReindex()
 	if syncEnabled {
 	if syncEnabled {
 		func() {
 		func() {
 			time.Sleep(5 * time.Second)
 			time.Sleep(5 * time.Second)
@@ -616,7 +616,7 @@ func syncRepo(boot, exit, byHand bool) (err error) {
 	cache.ClearDocsIAL() // 同步后文档树文档图标没有更新 https://github.com/siyuan-note/siyuan/issues/4939
 	cache.ClearDocsIAL() // 同步后文档树文档图标没有更新 https://github.com/siyuan-note/siyuan/issues/4939
 
 
 	if needFullReindex(upsertTrees) { // 改进同步后全量重建索引判断 https://github.com/siyuan-note/siyuan/issues/5764
 	if needFullReindex(upsertTrees) { // 改进同步后全量重建索引判断 https://github.com/siyuan-note/siyuan/issues/5764
-		RefreshFileTree()
+		FullReindex()
 		return
 		return
 	}
 	}
 	incReindex(upserts, removes)
 	incReindex(upserts, removes)

+ 4 - 9
kernel/model/template.go

@@ -237,23 +237,18 @@ func renderTemplate(p, id string) (string, error) {
 }
 }
 
 
 func appendRefTextRenderResultForBlockRef(blockRef *ast.Node) {
 func appendRefTextRenderResultForBlockRef(blockRef *ast.Node) {
-	if ast.NodeBlockRef != blockRef.Type {
+	if !treenode.IsBlockRef(blockRef) {
 		return
 		return
 	}
 	}
 
 
-	refText := blockRef.ChildByType(ast.NodeBlockRefText)
-	if nil != refText {
-		return
-	}
-	refText = blockRef.ChildByType(ast.NodeBlockRefDynamicText)
-	if nil != refText {
+	refID, text, _ := treenode.GetBlockRef(blockRef)
+	if "" != text {
 		return
 		return
 	}
 	}
 
 
 	// 动态解析渲染 ((id)) 的锚文本
 	// 动态解析渲染 ((id)) 的锚文本
 	// 现行版本已经不存在该语法情况,这里保留是为了迁移历史数据
 	// 现行版本已经不存在该语法情况,这里保留是为了迁移历史数据
-	refID := blockRef.ChildByType(ast.NodeBlockRefID)
-	text := sql.GetRefText(refID.TokensStr())
+	text = sql.GetRefText(refID)
 	if Conf.Editor.BlockRefDynamicAnchorTextMaxLen < utf8.RuneCountInString(text) {
 	if Conf.Editor.BlockRefDynamicAnchorTextMaxLen < utf8.RuneCountInString(text) {
 		text = gulu.Str.SubStr(text, Conf.Editor.BlockRefDynamicAnchorTextMaxLen) + "..."
 		text = gulu.Str.SubStr(text, Conf.Editor.BlockRefDynamicAnchorTextMaxLen) + "..."
 	}
 	}

+ 23 - 20
kernel/model/transaction.go

@@ -883,7 +883,9 @@ func (tx *Transaction) doUpdate(operation *Operation) (ret *TxErr) {
 				// 剔除空白的行级公式
 				// 剔除空白的行级公式
 				unlinks = append(unlinks, n)
 				unlinks = append(unlinks, n)
 			}
 			}
-		} else if ast.NodeBlockRefID == n.Type {
+		} else if ast.NodeBlockRef == n.Type {
+			sql.CacheRef(subTree, n)
+		} else if ast.NodeTextMark == n.Type && n.IsTextMarkType("block-ref") {
 			sql.CacheRef(subTree, n)
 			sql.CacheRef(subTree, n)
 		}
 		}
 		return ast.WalkContinue
 		return ast.WalkContinue
@@ -1098,27 +1100,28 @@ func updateRefText(refNode *ast.Node, changedDefNodes map[string]*ast.Node) (cha
 		if !entering {
 		if !entering {
 			return ast.WalkContinue
 			return ast.WalkContinue
 		}
 		}
-		if ast.NodeBlockRef == n.Type && nil != n.ChildByType(ast.NodeBlockRefDynamicText) {
-			defIDNode := n.ChildByType(ast.NodeBlockRefID)
-			if nil == defIDNode {
-				return ast.WalkSkipChildren
-			}
-			defID := defIDNode.TokensStr()
-			defNode := changedDefNodes[defID]
-			if nil == defNode {
-				return ast.WalkSkipChildren
-			}
-			if ast.NodeDocument != defNode.Type && defNode.IsContainerBlock() {
-				defNode = treenode.FirstLeafBlock(defNode)
-			}
-			defContent := renderBlockText(defNode)
-			if Conf.Editor.BlockRefDynamicAnchorTextMaxLen < utf8.RuneCountInString(defContent) {
-				defContent = gulu.Str.SubStr(defContent, Conf.Editor.BlockRefDynamicAnchorTextMaxLen) + "..."
-			}
-			treenode.SetDynamicBlockRefText(n, defContent)
-			changed = true
+		if !treenode.IsBlockRef(n) {
+			return ast.WalkContinue
+		}
+
+		defID, _, subtype := treenode.GetBlockRef(n)
+		if "s" == subtype || "" == defID {
+			return ast.WalkContinue
+		}
+
+		defNode := changedDefNodes[defID]
+		if nil == defNode {
 			return ast.WalkSkipChildren
 			return ast.WalkSkipChildren
 		}
 		}
+		if ast.NodeDocument != defNode.Type && defNode.IsContainerBlock() {
+			defNode = treenode.FirstLeafBlock(defNode)
+		}
+		defContent := renderBlockText(defNode)
+		if Conf.Editor.BlockRefDynamicAnchorTextMaxLen < utf8.RuneCountInString(defContent) {
+			defContent = gulu.Str.SubStr(defContent, Conf.Editor.BlockRefDynamicAnchorTextMaxLen) + "..."
+		}
+		treenode.SetDynamicBlockRefText(n, defContent)
+		changed = true
 		return ast.WalkContinue
 		return ast.WalkContinue
 	})
 	})
 	return
 	return

+ 17 - 5
kernel/model/tree.go

@@ -52,10 +52,14 @@ func resetTree(tree *parse.Tree, titleSuffix string) {
 	// 收集所有引用
 	// 收集所有引用
 	refIDs := map[string]string{}
 	refIDs := map[string]string{}
 	ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
 	ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
-		if !entering || ast.NodeBlockRefID != n.Type {
+		if !entering || !treenode.IsBlockRef(n) {
 			return ast.WalkContinue
 			return ast.WalkContinue
 		}
 		}
-		refIDs[n.TokensStr()] = "1"
+		defID, _, _ := treenode.GetBlockRef(n)
+		if "" == defID {
+			return ast.WalkContinue
+		}
+		refIDs[defID] = "1"
 		return ast.WalkContinue
 		return ast.WalkContinue
 	})
 	})
 
 
@@ -78,11 +82,19 @@ func resetTree(tree *parse.Tree, titleSuffix string) {
 
 
 	// 重置内部引用
 	// 重置内部引用
 	ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
 	ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
-		if !entering || ast.NodeBlockRefID != n.Type {
+		if !entering || !treenode.IsBlockRef(n) {
 			return ast.WalkContinue
 			return ast.WalkContinue
 		}
 		}
-		if "1" != refIDs[n.TokensStr()] {
-			n.Tokens = []byte(refIDs[n.TokensStr()])
+		defID, _, _ := treenode.GetBlockRef(n)
+		if "" == defID {
+			return ast.WalkContinue
+		}
+		if "1" != refIDs[defID] {
+			if ast.NodeBlockRefID == n.Type {
+				n.Tokens = []byte(refIDs[defID])
+			} else if ast.NodeTextMark == n.Type {
+				n.TextMarkBlockRefID = refIDs[defID]
+			}
 		}
 		}
 		return ast.WalkContinue
 		return ast.WalkContinue
 	})
 	})

+ 2 - 2
kernel/sql/cache.go

@@ -112,8 +112,8 @@ func GetRefsCacheByDefID(defID string) (ret []*Ref) {
 
 
 var defIDRefsCache = gcache.New(30*time.Minute, 5*time.Minute) // [defBlockID]map[refBlockID]*Ref
 var defIDRefsCache = gcache.New(30*time.Minute, 5*time.Minute) // [defBlockID]map[refBlockID]*Ref
 
 
-func CacheRef(tree *parse.Tree, refIDNode *ast.Node) {
-	ref := buildRef(tree, refIDNode)
+func CacheRef(tree *parse.Tree, refNode *ast.Node) {
+	ref := buildRef(tree, refNode)
 	putRefCache(ref)
 	putRefCache(ref)
 }
 }
 
 

+ 6 - 7
kernel/sql/database.go

@@ -269,7 +269,7 @@ func refsFromTree(tree *parse.Tree) (refs []*Ref, fileAnnotationRefs []*FileAnno
 			return ast.WalkContinue
 			return ast.WalkContinue
 		}
 		}
 
 
-		if ast.NodeBlockRefID == n.Type {
+		if treenode.IsBlockRef(n) {
 			ref := buildRef(tree, n)
 			ref := buildRef(tree, n)
 			refs = append(refs, ref)
 			refs = append(refs, ref)
 		} else if ast.NodeFileAnnotationRefID == n.Type {
 		} else if ast.NodeFileAnnotationRefID == n.Type {
@@ -306,9 +306,9 @@ func refsFromTree(tree *parse.Tree) (refs []*Ref, fileAnnotationRefs []*FileAnno
 	return
 	return
 }
 }
 
 
-func buildRef(tree *parse.Tree, refIDNode *ast.Node) *Ref {
-	markdown := treenode.FormatNode(refIDNode.Parent, luteEngine)
-	defBlockID := refIDNode.TokensStr()
+func buildRef(tree *parse.Tree, refNode *ast.Node) *Ref {
+	markdown := treenode.FormatNode(refNode, luteEngine)
+	defBlockID, text, _ := treenode.GetBlockRef(refNode)
 	var defBlockParentID, defBlockRootID, defBlockPath string
 	var defBlockParentID, defBlockRootID, defBlockPath string
 	defBlock := treenode.GetBlockTree(defBlockID)
 	defBlock := treenode.GetBlockTree(defBlockID)
 	if nil != defBlock {
 	if nil != defBlock {
@@ -316,8 +316,7 @@ func buildRef(tree *parse.Tree, refIDNode *ast.Node) *Ref {
 		defBlockRootID = defBlock.RootID
 		defBlockRootID = defBlock.RootID
 		defBlockPath = defBlock.Path
 		defBlockPath = defBlock.Path
 	}
 	}
-	text := treenode.GetDynamicBlockRefText(refIDNode.Parent)
-	parentBlock := treenode.ParentBlock(refIDNode)
+	parentBlock := treenode.ParentBlock(refNode)
 	return &Ref{
 	return &Ref{
 		ID:               ast.NewNodeID(),
 		ID:               ast.NewNodeID(),
 		DefBlockID:       defBlockID,
 		DefBlockID:       defBlockID,
@@ -330,7 +329,7 @@ func buildRef(tree *parse.Tree, refIDNode *ast.Node) *Ref {
 		Path:             tree.Path,
 		Path:             tree.Path,
 		Content:          text,
 		Content:          text,
 		Markdown:         markdown,
 		Markdown:         markdown,
-		Type:             treenode.TypeAbbr(refIDNode.Type.String()),
+		Type:             treenode.TypeAbbr(refNode.Type.String()),
 	}
 	}
 }
 }
 
 

+ 63 - 13
kernel/treenode/node.go

@@ -31,6 +31,50 @@ import (
 	"github.com/siyuan-note/logging"
 	"github.com/siyuan-note/logging"
 )
 )
 
 
+func GetBlockRef(n *ast.Node) (blockRefID, blockRefText, blockRefSubtype string) {
+	if !IsBlockRef(n) {
+		return
+	}
+	if ast.NodeBlockRef == n.Type {
+		id := n.ChildByType(ast.NodeBlockRefID)
+		if nil == id {
+			return
+		}
+		blockRefID = id.TokensStr()
+		text := n.ChildByType(ast.NodeBlockRefText)
+		if nil != text {
+			blockRefText = text.Text()
+			blockRefSubtype = "s"
+			return
+		}
+		text = n.ChildByType(ast.NodeBlockRefDynamicText)
+		if nil != text {
+			blockRefText = text.Text()
+			blockRefSubtype = "d"
+			return
+		}
+	}
+	if ast.NodeTextMark == n.Type {
+		blockRefID = n.TextMarkBlockRefID
+		blockRefText = n.TextMarkTextContent
+		blockRefSubtype = n.TextMarkBlockRefSubtype
+	}
+	return
+}
+
+func IsBlockRef(n *ast.Node) bool {
+	if nil == n {
+		return false
+	}
+	if ast.NodeBlockRef == n.Type {
+		return true
+	}
+	if ast.NodeTextMark == n.Type {
+		return n.IsTextMarkType("block-ref")
+	}
+	return false
+}
+
 // NestedInlines2FlattedSpans 将嵌套的行级节点转换为平铺的文本标记节点。
 // NestedInlines2FlattedSpans 将嵌套的行级节点转换为平铺的文本标记节点。
 func NestedInlines2FlattedSpans(tree *parse.Tree) {
 func NestedInlines2FlattedSpans(tree *parse.Tree) {
 	defer logging.Recover()
 	defer logging.Recover()
@@ -391,25 +435,31 @@ func GetLegacyDynamicBlockRefDefIDs(node *ast.Node) (ret []string) {
 }
 }
 
 
 func SetDynamicBlockRefText(blockRef *ast.Node, refText string) {
 func SetDynamicBlockRefText(blockRef *ast.Node, refText string) {
-	if nil == blockRef {
+	if !IsBlockRef(blockRef) {
 		return
 		return
 	}
 	}
 
 
-	idNode := blockRef.ChildByType(ast.NodeBlockRefID)
-	if nil == idNode {
+	if ast.NodeBlockRef == blockRef.Type {
+		idNode := blockRef.ChildByType(ast.NodeBlockRefID)
+		if nil == idNode {
+			return
+		}
+
+		var spacesRefTexts []*ast.Node // 可能会有多个空格,或者遗留错误插入的锚文本节点,这里做一次订正
+		for n := idNode.Next; ast.NodeCloseParen != n.Type; n = n.Next {
+			spacesRefTexts = append(spacesRefTexts, n)
+		}
+		for _, toRemove := range spacesRefTexts {
+			toRemove.Unlink()
+		}
+		refText = strings.TrimSpace(refText)
+		idNode.InsertAfter(&ast.Node{Type: ast.NodeBlockRefDynamicText, Tokens: []byte(refText)})
+		idNode.InsertAfter(&ast.Node{Type: ast.NodeBlockRefSpace})
 		return
 		return
 	}
 	}
 
 
-	var spacesRefTexts []*ast.Node // 可能会有多个空格,或者遗留错误插入的锚文本节点,这里做一次订正
-	for n := idNode.Next; ast.NodeCloseParen != n.Type; n = n.Next {
-		spacesRefTexts = append(spacesRefTexts, n)
-	}
-	for _, toRemove := range spacesRefTexts {
-		toRemove.Unlink()
-	}
-	refText = strings.TrimSpace(refText)
-	idNode.InsertAfter(&ast.Node{Type: ast.NodeBlockRefDynamicText, Tokens: []byte(refText)})
-	idNode.InsertAfter(&ast.Node{Type: ast.NodeBlockRefSpace})
+	blockRef.TextMarkBlockRefSubtype = "d"
+	blockRef.TextMarkTextContent = refText
 }
 }
 
 
 func GetDynamicBlockRefText(blockRef *ast.Node) string {
 func GetDynamicBlockRefText(blockRef *ast.Node) string {

部分文件因为文件数量过多而无法显示