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-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/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/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/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": "​" } ] } 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": "​ 刷新當前文檔" } ] } 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))