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

This commit is contained in:
Vanessa 2022-12-25 11:47:44 +08:00
commit 7d19a8e88c
8 changed files with 203 additions and 425 deletions

View file

@ -8,7 +8,7 @@
"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;",
"type": "doc",
"updated": "20221225013408"
"updated": "20221225103242"
},
"Children": [
{
@ -3138,7 +3138,7 @@
"ListData": {},
"Properties": {
"id": "20221225013111-f97ur4a",
"updated": "20221225013408"
"updated": "20221225103242"
},
"Children": [
{
@ -3150,7 +3150,7 @@
},
"Properties": {
"id": "20221225013111-jhcu06t",
"updated": "20221225013111"
"updated": "20221225103242"
},
"Children": [
{
@ -3168,54 +3168,29 @@
]
},
{
"ID": "20221225013111-t6sb6j6",
"Type": "NodeList",
"ListData": {},
"ID": "20221225103239-3a212px",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225013111-t6sb6j6",
"updated": "20221225013111"
"id": "20221225103239-3a212px",
"updated": "20221225103242"
},
"Children": [
{
"ID": "20221225013111-7mps9wm",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20221225013111-7mps9wm",
"updated": "20221225013111"
},
"Children": [
{
"ID": "20221225013111-r6474wt",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225013111-r6474wt",
"updated": "20221225013111"
},
"Children": [
{
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "anNvbg=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "{\n \"propName\": \"propValue\"\n}\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
]
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "anNvbg=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "{\n \"propName\": \"propValue\"\n}\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
@ -3248,54 +3223,29 @@
]
},
{
"ID": "20221225013111-unluh7r",
"Type": "NodeList",
"ListData": {},
"ID": "20221225103231-nffgx96",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225013111-unluh7r",
"updated": "20221225013111"
"id": "20221225103231-nffgx96",
"updated": "20221225103236"
},
"Children": [
{
"ID": "20221225013111-oy9fq7l",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20221225013111-oy9fq7l",
"updated": "20221225013111"
},
"Children": [
{
"ID": "20221225013111-hdaldw8",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225013111-hdaldw8",
"updated": "20221225013111"
},
"Children": [
{
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "amF2YXNjcmlwdA=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "{\n propName: 'propValue',\n}\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
]
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "amF2YXNjcmlwdA=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "{\n propName: 'propValue',\n}\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
@ -3328,54 +3278,29 @@
]
},
{
"ID": "20221225013111-ech372z",
"Type": "NodeList",
"ListData": {},
"ID": "20221225103222-gizv6uz",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225013111-ech372z",
"updated": "20221225013111"
"id": "20221225103222-gizv6uz",
"updated": "20221225103227"
},
"Children": [
{
"ID": "20221225013111-hhjn30z",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20221225013111-hhjn30z",
"updated": "20221225013111"
},
"Children": [
{
"ID": "20221225013111-vq3lqmp",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225013111-vq3lqmp",
"updated": "20221225013111"
},
"Children": [
{
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "amF2YXNjcmlwdA=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "(() =\u003e {\n const option = {};\n option.propName = `propValue`;\n return option;\n})()\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
]
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "amF2YXNjcmlwdA=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "(() =\u003e {\n const option = {};\n option.propName = `propValue`;\n return option;\n})()\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}

View file

@ -8,7 +8,7 @@
"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);",
"type": "doc",
"updated": "20221225012910"
"updated": "20221225103122"
},
"Children": [
{
@ -3135,7 +3135,7 @@
"ListData": {},
"Properties": {
"id": "20221225011757-zcfae5d",
"updated": "20221225012910"
"updated": "20221225103122"
},
"Children": [
{
@ -3165,54 +3165,29 @@
]
},
{
"ID": "20221225012020-fclr7wc",
"Type": "NodeList",
"ListData": {},
"ID": "20221225103039-o8ap7h6",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225012020-fclr7wc",
"updated": "20221225012827"
"id": "20221225103039-o8ap7h6",
"updated": "20221225103059"
},
"Children": [
{
"ID": "20221225012020-ccv0cpm",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20221225012020-ccv0cpm",
"updated": "20221225012827"
},
"Children": [
{
"ID": "20221225012020-a7nibhu",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225012020-a7nibhu",
"updated": "20221225012827"
},
"Children": [
{
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "anNvbg=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "{\n \"propName\": \"propValue\"\n}\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
]
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "anNvbg=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "{\n \"propName\": \"propValue\"\n}\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
@ -3244,52 +3219,29 @@
]
},
{
"ID": "20221225012504-vri2cye",
"Type": "NodeList",
"ListData": {},
"ID": "20221225103111-8jioici",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225012504-vri2cye"
"id": "20221225103111-8jioici",
"updated": "20221225103114"
},
"Children": [
{
"ID": "20221225012503-52bpd8m",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20221225012503-52bpd8m"
},
"Children": [
{
"ID": "20221225012503-osjhbni",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225012503-osjhbni",
"updated": "20221225012615"
},
"Children": [
{
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "amF2YXNjcmlwdA=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "{\n propName: 'propValue',\n}\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
]
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "amF2YXNjcmlwdA=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "{\n propName: 'propValue',\n}\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
@ -3304,7 +3256,7 @@
},
"Properties": {
"id": "20221225011805-qla9i5b",
"updated": "20221225012910"
"updated": "20221225103122"
},
"Children": [
{
@ -3322,54 +3274,29 @@
]
},
{
"ID": "20221225012629-qdzqfiq",
"Type": "NodeList",
"ListData": {},
"ID": "20221225103118-uw8ui6i",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225012629-qdzqfiq",
"updated": "20221225012910"
"id": "20221225103118-uw8ui6i",
"updated": "20221225103122"
},
"Children": [
{
"ID": "20221225012629-wkougnr",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20221225012629-wkougnr",
"updated": "20221225012910"
},
"Children": [
{
"ID": "20221225012629-1ha6h2j",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225012629-1ha6h2j",
"updated": "20221225012910"
},
"Children": [
{
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "amF2YXNjcmlwdA=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "(() =\u003e {\n const option = {};\n option.propName = `propValue`;\n return option;\n})()\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
]
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "amF2YXNjcmlwdA=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "(() =\u003e {\n const option = {};\n option.propName = `propValue`;\n return option;\n})()\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}

View file

@ -7,7 +7,7 @@
"id": "20211226121319-emrk2yy",
"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);",
"updated": "20221225013013"
"updated": "20221225103315"
},
"Children": [
{
@ -3112,7 +3112,7 @@
"ListData": {},
"Properties": {
"id": "20221225012948-i6bceww",
"updated": "20221225013013"
"updated": "20221225103315"
},
"Children": [
{
@ -3142,54 +3142,29 @@
]
},
{
"ID": "20221225012948-si3kytj",
"Type": "NodeList",
"ListData": {},
"ID": "20221225103257-i53ywyn",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225012948-si3kytj",
"updated": "20221225012948"
"id": "20221225103257-i53ywyn",
"updated": "20221225103300"
},
"Children": [
{
"ID": "20221225012948-4hjr5xi",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20221225012948-4hjr5xi",
"updated": "20221225012948"
},
"Children": [
{
"ID": "20221225012948-jhn1wm0",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225012948-jhn1wm0",
"updated": "20221225012948"
},
"Children": [
{
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "anNvbg=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "{\n \"propName\": \"propValue\"\n}\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
]
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "anNvbg=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "{\n \"propName\": \"propValue\"\n}\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
@ -3222,54 +3197,29 @@
]
},
{
"ID": "20221225012948-w1w6605",
"Type": "NodeList",
"ListData": {},
"ID": "20221225103303-e1cnv1n",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225012948-w1w6605",
"updated": "20221225012948"
"id": "20221225103303-e1cnv1n",
"updated": "20221225103308"
},
"Children": [
{
"ID": "20221225012948-dcmh3u7",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20221225012948-dcmh3u7",
"updated": "20221225012948"
},
"Children": [
{
"ID": "20221225012948-6envn24",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225012948-6envn24",
"updated": "20221225012948"
},
"Children": [
{
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "amF2YXNjcmlwdA=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "{\n propName: 'propValue',\n}\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
]
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "amF2YXNjcmlwdA=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "{\n propName: 'propValue',\n}\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
@ -3284,7 +3234,7 @@
},
"Properties": {
"id": "20221225012948-u5z9jmr",
"updated": "20221225013013"
"updated": "20221225103315"
},
"Children": [
{
@ -3302,54 +3252,29 @@
]
},
{
"ID": "20221225012948-2d26uk8",
"Type": "NodeList",
"ListData": {},
"ID": "20221225103311-4asih4h",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225012948-2d26uk8",
"updated": "20221225012948"
"id": "20221225103311-4asih4h",
"updated": "20221225103315"
},
"Children": [
{
"ID": "20221225012948-0pxhnd0",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20221225012948-0pxhnd0",
"updated": "20221225012948"
},
"Children": [
{
"ID": "20221225012948-27doejs",
"Type": "NodeCodeBlock",
"IsFencedCodeBlock": true,
"Properties": {
"id": "20221225012948-27doejs",
"updated": "20221225012948"
},
"Children": [
{
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "amF2YXNjcmlwdA=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "(() =\u003e {\n const option = {};\n option.propName = `propValue`;\n return option;\n})()\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}
]
"Type": "NodeCodeBlockFenceOpenMarker",
"Data": "```"
},
{
"Type": "NodeCodeBlockFenceInfoMarker",
"CodeBlockInfo": "amF2YXNjcmlwdA=="
},
{
"Type": "NodeCodeBlockCode",
"Data": "(() =\u003e {\n const option = {};\n option.propName = `propValue`;\n return option;\n})()\n"
},
{
"Type": "NodeCodeBlockFenceCloseMarker",
"Data": "```"
}
]
}

View file

@ -644,25 +644,23 @@ func GetDoc(startID, endID, id string, index int, keyword string, mode int, size
n.Tokens = gulu.Str.ToBytes(text)
}
if ast.NodeText == n.Type {
if 0 < len(keywords) {
hitBlock := false
for p := n.Parent; nil != p; p = p.Parent {
if p.ID == id {
hitBlock = true
break
}
}
if hitBlock {
if markReplaceSpan(n, &unlinks, keywords, searchMarkDataType, luteEngine) {
return ast.WalkContinue
}
if 0 < len(keywords) {
hitBlock := false
for p := n.Parent; nil != p; p = p.Parent {
if p.ID == id {
hitBlock = true
break
}
}
if hitBlock {
if markReplaceSpan(n, &unlinks, keywords, searchMarkDataType, luteEngine) {
return ast.WalkContinue
}
}
}
if processVirtualRef(n, &unlinks, virtualBlockRefKeywords, refCount, luteEngine) {
return ast.WalkContinue
}
if processVirtualRef(n, &unlinks, virtualBlockRefKeywords, refCount, luteEngine) {
return ast.WalkContinue
}
return ast.WalkContinue
})

View file

@ -177,11 +177,9 @@ func GetDocHistoryContent(historyPath, keyword string) (id, rootID, content stri
n.RemoveIALAttr("heading-fold")
n.RemoveIALAttr("fold")
if ast.NodeText == n.Type {
if 0 < len(keywords) {
if markReplaceSpan(n, &unlinks, keywords, searchMarkDataType, luteEngine) {
return ast.WalkContinue
}
if 0 < len(keywords) {
if markReplaceSpan(n, &unlinks, keywords, searchMarkDataType, luteEngine) {
return ast.WalkContinue
}
}
return ast.WalkContinue

View file

@ -893,6 +893,7 @@ func markReplaceSpan(n *ast.Node, unlinks *[]*ast.Node, keywords []string, markS
}
} else if ast.NodeTextMark == n.Type {
// TODO 搜索结果高亮支持大部分行级元素 https://github.com/siyuan-note/siyuan/issues/6745
}
return false
}

View file

@ -264,7 +264,7 @@ func sortTags(tags Tags) {
func SearchTags(keyword string) (ret []string) {
ret = []string{}
defer logging.Recover() // TODO: 定位 无法添加题头图标签 https://github.com/siyuan-note/siyuan/issues/6756
defer logging.Recover() // 定位 无法添加题头图标签 https://github.com/siyuan-note/siyuan/issues/6756
labels := labelBlocksByKeyword(keyword)
for label, _ := range labels {

View file

@ -35,6 +35,10 @@ func processVirtualRef(n *ast.Node, unlinks *[]*ast.Node, virtualBlockRefKeyword
return false
}
if ast.NodeText != n.Type {
return false
}
parentBlock := treenode.ParentBlock(n)
if nil == parentBlock || 0 < refCount[parentBlock.ID] {
return false