From 79cd01b8b893d75517146f94f01d96ed7c87cdc0 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 14 Oct 2022 10:16:02 +0800 Subject: [PATCH 1/3] =?UTF-8?q?:art:=20=E6=9B=B4=E6=96=B0=E8=99=9A?= =?UTF-8?q?=E6=8B=9F=E5=BC=95=E7=94=A8=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20211010212318-3wx2kqb.sy | 32 +++---------------- .../20211010211311-ffz0wbu.sy | 30 +---------------- .../20211226122814-r1rdpcx.sy | 30 +---------------- 3 files changed, 6 insertions(+), 86 deletions(-) diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20211010212318-3wx2kqb.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20211010212318-3wx2kqb.sy index 07c4f74eb..4e19a0bdb 100644 --- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20211010212318-3wx2kqb.sy +++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20211010212318-3wx2kqb.sy @@ -5,7 +5,7 @@ "Properties": { "id": "20211010212318-3wx2kqb", "title": "Virtual reference", - "updated": "20221003215008" + "updated": "20221003214948" }, "Children": [ { @@ -144,7 +144,7 @@ "ListData": {}, "Properties": { "id": "20221003214937-bqvm7yz", - "updated": "20221003215008" + "updated": "20221003214948" }, "Children": [ { @@ -175,34 +175,10 @@ "Type": "NodeTextMark", "TextMarkType": "kbd", "TextMarkTextContent": "F5" - } - ] - } - ] - }, - { - "ID": "20221003214937-0yqjmgz", - "Type": "NodeListItem", - "ListData": { - "BulletChar": 42, - "Marker": "Kg==" - }, - "Properties": { - "id": "20221003214937-0yqjmgz", - "updated": "20221003215008" - }, - "Children": [ - { - "ID": "20221003214937-7rkkbhp", - "Type": "NodeParagraph", - "Properties": { - "id": "20221003214937-7rkkbhp", - "updated": "20221003215008" - }, - "Children": [ + }, { "Type": "NodeText", - "Data": "For English characters, you need to use a space for word segmentation to make the virtual reference take effect. If the English content appears at the beginning of the paragraph, you also need to use the space at the end to take effect" + "Data": "​" } ] } diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20211010211311-ffz0wbu.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20211010211311-ffz0wbu.sy index 20d1a060c..0d37ec69c 100644 --- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20211010211311-ffz0wbu.sy +++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20211010211311-ffz0wbu.sy @@ -178,35 +178,7 @@ }, { "Type": "NodeText", - "Data": " 刷新当前文档" - } - ] - } - ] - }, - { - "ID": "20221003214613-hik3s1f", - "Type": "NodeListItem", - "ListData": { - "BulletChar": 42, - "Marker": "Kg==" - }, - "Properties": { - "id": "20221003214613-hik3s1f", - "updated": "20221003214741" - }, - "Children": [ - { - "ID": "20221003214613-954oouj", - "Type": "NodeParagraph", - "Properties": { - "id": "20221003214613-954oouj", - "updated": "20221003214741" - }, - "Children": [ - { - "Type": "NodeText", - "Data": "对于英文字符需要使用空格分词才能使虚拟引用生效,如果英文内容出现在段首,也需要使用空格结尾才能生效" + "Data": "​ 刷新当前文档" } ] } diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122814-r1rdpcx.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122814-r1rdpcx.sy index 88082dac2..97976e729 100644 --- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122814-r1rdpcx.sy +++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122814-r1rdpcx.sy @@ -178,35 +178,7 @@ }, { "Type": "NodeText", - "Data": " 刷新當前文檔" - } - ] - } - ] - }, - { - "ID": "20221003215030-g5mzgmu", - "Type": "NodeListItem", - "ListData": { - "BulletChar": 42, - "Marker": "Kg==" - }, - "Properties": { - "id": "20221003215030-g5mzgmu", - "updated": "20221003215030" - }, - "Children": [ - { - "ID": "20221003215030-k00obsv", - "Type": "NodeParagraph", - "Properties": { - "id": "20221003215030-k00obsv", - "updated": "20221003215030" - }, - "Children": [ - { - "Type": "NodeText", - "Data": "對於英文字符需要使用空格分詞才能使虛擬引用生效,如果英文內容出現在段首,也需要使用空格結尾才能生效" + "Data": "​ 刷新當前文檔" } ] } From 25ecf77aa00abe216575f3acef04279fcaab3340 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 14 Oct 2022 12:16:54 +0800 Subject: [PATCH 2/3] =?UTF-8?q?:bug:=20API=20`/api/attr/setBlockAttrs`=20?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=B1=9E=E6=80=A7=E5=80=BC=E8=BD=AC=E4=B9=89?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20https://github.com/siyuan-note/siyuan/issu?= =?UTF-8?q?es/6198?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/blockial.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/model/blockial.go b/kernel/model/blockial.go index 176798906..428be97f3 100644 --- a/kernel/model/blockial.go +++ b/kernel/model/blockial.go @@ -107,7 +107,7 @@ func SetBlockAttrs(id string, nameValues map[string]string) (err error) { oldAttrs := parse.IAL2Map(node.KramdownIAL) - for name, _ := range nameValues { + for name := range nameValues { for i := 0; i < len(name); i++ { if !lex.IsASCIILetterNumHyphen(name[i]) { return errors.New(fmt.Sprintf(Conf.Language(25), id)) @@ -119,7 +119,7 @@ func SetBlockAttrs(id string, nameValues map[string]string) (err error) { if "" == value { node.RemoveIALAttr(name) } else { - node.SetIALAttr(name, html.EscapeAttrVal(value)) + node.SetIALAttr(name, value) } } @@ -164,7 +164,7 @@ func ResetBlockAttrs(id string, nameValues map[string]string) (err error) { return errors.New(fmt.Sprintf(Conf.Language(15), id)) } - for name, _ := range nameValues { + for name := range nameValues { for i := 0; i < len(name); i++ { if !lex.IsASCIILetterNumHyphen(name[i]) { return errors.New(fmt.Sprintf(Conf.Language(25), id)) From 30fb9635c14be2cca569db26b16ec0ac93ee7de4 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 14 Oct 2022 13:32:41 +0800 Subject: [PATCH 3/3] =?UTF-8?q?:memo:=20=E6=9B=B4=E6=96=B0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E8=A1=A8=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20201222100339-i5hzcph.sy | 100 +++++++---------- .../20201222093044-rx4zjoy.sy | 102 ++++++++---------- .../20211226121808-fnxmngk.sy | 102 ++++++++---------- 3 files changed, 125 insertions(+), 179 deletions(-) diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-l3qg72k/20201222100339-i5hzcph.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-l3qg72k/20201222100339-i5hzcph.sy index aaa548608..7a79958a6 100644 --- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-l3qg72k/20201222100339-i5hzcph.sy +++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-l3qg72k/20201222100339-i5hzcph.sy @@ -6,7 +6,7 @@ "id": "20201222100339-i5hzcph", "title": "Database table", "type": "doc", - "updated": "20220828090316" + "updated": "20221014133135" }, "Children": [ { @@ -56,7 +56,7 @@ "Properties": { "colgroup": "|", "id": "20210111225813-9kys36i", - "updated": "20220828090316" + "updated": "20221014133135" }, "Children": [ { @@ -470,6 +470,10 @@ "Type": "NodeTextMark", "TextMarkType": "code", "TextMarkTextContent": "fcontent" + }, + { + "Type": "NodeText", + "Data": "​" } ] } @@ -499,33 +503,11 @@ "Data": "Content block type, please refer to " }, { - "Type": "NodeBlockRef", - "Data": "span", - "Children": [ - { - "Type": "NodeOpenParen" - }, - { - "Type": "NodeOpenParen" - }, - { - "Type": "NodeBlockRefID", - "Data": "20210210104024-efd1ar6" - }, - { - "Type": "NodeBlockRefSpace" - }, - { - "Type": "NodeBlockRefText", - "Data": "here" - }, - { - "Type": "NodeCloseParen" - }, - { - "Type": "NodeCloseParen" - } - ] + "Type": "NodeTextMark", + "TextMarkType": "block-ref", + "TextMarkBlockRefID": "20210210104024-efd1ar6", + "TextMarkBlockRefSubtype": "s", + "TextMarkTextContent": "here" } ] } @@ -555,33 +537,11 @@ "Data": "Content block subtype, please refer to " }, { - "Type": "NodeBlockRef", - "Data": "span", - "Children": [ - { - "Type": "NodeOpenParen" - }, - { - "Type": "NodeOpenParen" - }, - { - "Type": "NodeBlockRefID", - "Data": "20210210104037-xex9wds" - }, - { - "Type": "NodeBlockRefSpace" - }, - { - "Type": "NodeBlockRefText", - "Data": "here" - }, - { - "Type": "NodeCloseParen" - }, - { - "Type": "NodeCloseParen" - } - ] + "Type": "NodeTextMark", + "TextMarkType": "block-ref", + "TextMarkBlockRefID": "20210210104037-xex9wds", + "TextMarkBlockRefSubtype": "s", + "TextMarkTextContent": "here" } ] } @@ -613,7 +573,11 @@ { "Type": "NodeTextMark", "TextMarkType": "code", - "TextMarkTextContent": "{: name=\"value\"}" + "TextMarkTextContent": "{: name=\u0026quot;value\u0026quot;}" + }, + { + "Type": "NodeText", + "Data": "​" } ] } @@ -667,7 +631,16 @@ "Children": [ { "Type": "NodeText", - "Data": "Create time" + "Data": "Create time, for example " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "20221013202001" + }, + { + "Type": "NodeText", + "Data": "​" } ] } @@ -694,7 +667,16 @@ "Children": [ { "Type": "NodeText", - "Data": "Update time" + "Data": "Update time, for example " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "20221013202001" + }, + { + "Type": "NodeText", + "Data": "​" } ] } diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-gyngv2x/20201222093044-rx4zjoy.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-gyngv2x/20201222093044-rx4zjoy.sy index 86539ae17..2c4e6828b 100644 --- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-gyngv2x/20201222093044-rx4zjoy.sy +++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-gyngv2x/20201222093044-rx4zjoy.sy @@ -6,7 +6,7 @@ "id": "20201222093044-rx4zjoy", "title": "数据库表", "type": "doc", - "updated": "20220828090146" + "updated": "20221014133123" }, "Children": [ { @@ -56,7 +56,7 @@ "Properties": { "colgroup": "|", "id": "20201224120447-cs6ur9x", - "updated": "20220828090146" + "updated": "20221014133123" }, "Children": [ { @@ -462,6 +462,10 @@ "Type": "NodeTableCell", "Data": "td", "Children": [ + { + "Type": "NodeText", + "Data": "​" + }, { "Type": "NodeTextMark", "TextMarkType": "code", @@ -469,7 +473,7 @@ }, { "Type": "NodeText", - "Data": " 长度" + "Data": "​ 长度" } ] } @@ -499,33 +503,11 @@ "Data": "内容块类型,参考" }, { - "Type": "NodeBlockRef", - "Data": "span", - "Children": [ - { - "Type": "NodeOpenParen" - }, - { - "Type": "NodeOpenParen" - }, - { - "Type": "NodeBlockRefID", - "Data": "20210210103523-ombf290" - }, - { - "Type": "NodeBlockRefSpace" - }, - { - "Type": "NodeBlockRefText", - "Data": "这里" - }, - { - "Type": "NodeCloseParen" - }, - { - "Type": "NodeCloseParen" - } - ] + "Type": "NodeTextMark", + "TextMarkType": "block-ref", + "TextMarkBlockRefID": "20210210103523-ombf290", + "TextMarkBlockRefSubtype": "s", + "TextMarkTextContent": "这里" } ] } @@ -555,33 +537,11 @@ "Data": "内容块子类型,参考" }, { - "Type": "NodeBlockRef", - "Data": "span", - "Children": [ - { - "Type": "NodeOpenParen" - }, - { - "Type": "NodeOpenParen" - }, - { - "Type": "NodeBlockRefID", - "Data": "20210210103411-tcbcjja" - }, - { - "Type": "NodeBlockRefSpace" - }, - { - "Type": "NodeBlockRefText", - "Data": "这里" - }, - { - "Type": "NodeCloseParen" - }, - { - "Type": "NodeCloseParen" - } - ] + "Type": "NodeTextMark", + "TextMarkType": "block-ref", + "TextMarkBlockRefID": "20210210103411-tcbcjja", + "TextMarkBlockRefSubtype": "s", + "TextMarkTextContent": "这里" } ] } @@ -613,7 +573,11 @@ { "Type": "NodeTextMark", "TextMarkType": "code", - "TextMarkTextContent": "{: name=\"value\"}" + "TextMarkTextContent": "{: name=\u0026quot;value\u0026quot;}" + }, + { + "Type": "NodeText", + "Data": "​" } ] } @@ -667,7 +631,16 @@ "Children": [ { "Type": "NodeText", - "Data": "创建时间" + "Data": "创建时间,例如 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "20221013202001" + }, + { + "Type": "NodeText", + "Data": "​" } ] } @@ -694,7 +667,16 @@ "Children": [ { "Type": "NodeText", - "Data": "更新时间" + "Data": "更新时间,例如 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "20221013202001" + }, + { + "Type": "NodeText", + "Data": "​" } ] } diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120933-vnjgwwh/20211226121808-fnxmngk.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120933-vnjgwwh/20211226121808-fnxmngk.sy index eed24f9b1..8953af35d 100644 --- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120933-vnjgwwh/20211226121808-fnxmngk.sy +++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120933-vnjgwwh/20211226121808-fnxmngk.sy @@ -5,7 +5,7 @@ "Properties": { "id": "20211226121808-fnxmngk", "title": "資料庫表", - "updated": "20220828090211" + "updated": "20221014133129" }, "Children": [ { @@ -52,7 +52,7 @@ "Properties": { "colgroup": "|", "id": "20211226121831-s0emrpw", - "updated": "20220828090211" + "updated": "20221014133129" }, "Children": [ { @@ -458,6 +458,10 @@ "Type": "NodeTableCell", "Data": "td", "Children": [ + { + "Type": "NodeText", + "Data": "​" + }, { "Type": "NodeTextMark", "TextMarkType": "code", @@ -465,7 +469,7 @@ }, { "Type": "NodeText", - "Data": " 長度" + "Data": "​ 長度" } ] } @@ -495,33 +499,11 @@ "Data": "內容塊類型,參考" }, { - "Type": "NodeBlockRef", - "Data": "span", - "Children": [ - { - "Type": "NodeOpenParen" - }, - { - "Type": "NodeOpenParen" - }, - { - "Type": "NodeBlockRefID", - "Data": "20211226121740-xjez6e9" - }, - { - "Type": "NodeBlockRefSpace" - }, - { - "Type": "NodeBlockRefText", - "Data": "這裡" - }, - { - "Type": "NodeCloseParen" - }, - { - "Type": "NodeCloseParen" - } - ] + "Type": "NodeTextMark", + "TextMarkType": "block-ref", + "TextMarkBlockRefID": "20211226121740-xjez6e9", + "TextMarkBlockRefSubtype": "s", + "TextMarkTextContent": "這裡" } ] } @@ -551,33 +533,11 @@ "Data": "內容塊子類型,參考" }, { - "Type": "NodeBlockRef", - "Data": "span", - "Children": [ - { - "Type": "NodeOpenParen" - }, - { - "Type": "NodeOpenParen" - }, - { - "Type": "NodeBlockRefID", - "Data": "20211226121740-yo2ibhk" - }, - { - "Type": "NodeBlockRefSpace" - }, - { - "Type": "NodeBlockRefText", - "Data": "這裡" - }, - { - "Type": "NodeCloseParen" - }, - { - "Type": "NodeCloseParen" - } - ] + "Type": "NodeTextMark", + "TextMarkType": "block-ref", + "TextMarkBlockRefID": "20211226121740-yo2ibhk", + "TextMarkBlockRefSubtype": "s", + "TextMarkTextContent": "這裡" } ] } @@ -609,7 +569,11 @@ { "Type": "NodeTextMark", "TextMarkType": "code", - "TextMarkTextContent": "{: name=\"value\"}" + "TextMarkTextContent": "{: name=\u0026quot;value\u0026quot;}" + }, + { + "Type": "NodeText", + "Data": "​" } ] } @@ -663,7 +627,16 @@ "Children": [ { "Type": "NodeText", - "Data": "創建時間" + "Data": "創建時間,例如 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "20221013202001" + }, + { + "Type": "NodeText", + "Data": "​" } ] } @@ -690,7 +663,16 @@ "Children": [ { "Type": "NodeText", - "Data": "更新時間" + "Data": "更新時間,例如 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "20221013202001" + }, + { + "Type": "NodeText", + "Data": "​" } ] }