Skip to content

Commit

Permalink
🎨 Add word count template function runeCount and wordCount #13625
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Dec 25, 2024
1 parent 353cf08 commit 2f1885b
Show file tree
Hide file tree
Showing 5 changed files with 326 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"id": "20201204184532-3qm9l8n",
"title": "Template snippet",
"type": "doc",
"updated": "20241224162810"
"updated": "20241225192808"
},
"Children": [
{
Expand Down Expand Up @@ -57,7 +57,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20210104091444-jy56z0p",
"updated": "20241224162810"
"updated": "20241225192808"
},
"Children": [
{
Expand Down Expand Up @@ -215,7 +215,7 @@
"ListData": {},
"Properties": {
"id": "20210104091444-mwbvc9m",
"updated": "20241224162810"
"updated": "20241225192808"
},
"Children": [
{
Expand Down Expand Up @@ -249,7 +249,15 @@
},
{
"Type": "NodeText",
"Data": "​: Use this variable to insert the current document name. For example, if the template content is "
"Data": "​: Use this variable to insert the current document name. For example, if the "
},
{
"Type": "NodeText",
"Data": "template"
},
{
"Type": "NodeText",
"Data": " content is "
},
{
"Type": "NodeTextMark",
Expand Down Expand Up @@ -443,7 +451,15 @@
},
{
"Type": "NodeText",
"Data": "​: This function is used to query the database, and the return value is a list of blocks"
"Data": "​: This function is used to query the "
},
{
"Type": "NodeText",
"Data": "database"
},
{
"Type": "NodeText",
"Data": ", and the return value is a list of blocks"
}
]
},
Expand All @@ -453,6 +469,7 @@
"IsFencedCodeBlock": true,
"Properties": {
"id": "20241213215602-dk7iion",
"style": "line-height: 22px;",
"updated": "20241213215602"
},
"Children": [
Expand Down Expand Up @@ -506,7 +523,15 @@
},
{
"Type": "NodeText",
"Data": "​: This function is used to query the database, and the return value is a list of spans"
"Data": "​: This function is used to query the "
},
{
"Type": "NodeText",
"Data": "database"
},
{
"Type": "NodeText",
"Data": ", and the return value is a list of spans"
}
]
},
Expand All @@ -516,6 +541,7 @@
"IsFencedCodeBlock": true,
"Properties": {
"id": "20241213215606-a1mq6zf",
"style": "line-height: 22px;",
"updated": "20241224162810"
},
"Children": [
Expand Down Expand Up @@ -569,7 +595,15 @@
},
{
"Type": "NodeText",
"Data": "​: This function is used to query the database and the return value is a result set"
"Data": "​: This function is used to query the "
},
{
"Type": "NodeText",
"Data": "database"
},
{
"Type": "NodeText",
"Data": " and the return value is a result set"
}
]
},
Expand All @@ -579,6 +613,7 @@
"IsFencedCodeBlock": true,
"Properties": {
"id": "20241213215554-rox3jk7",
"style": "line-height: 22px;",
"updated": "20241213215554"
},
"Children": [
Expand Down Expand Up @@ -642,6 +677,7 @@
"IsFencedCodeBlock": true,
"Properties": {
"id": "20241213215714-u0j3i4k",
"style": "line-height: 22px;",
"updated": "20241213215714"
},
"Children": [
Expand Down Expand Up @@ -860,7 +896,44 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20241212163841-d8t3qxb",
"updated": "20241212163918"
"updated": "20241225192802"
},
"Children": [
{
"Type": "NodeText",
"Data": "​"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": "runeCount"
},
{
"Type": "NodeText",
"Data": "​: This function is used to return the number of characters in a string"
}
]
}
]
},
{
"ID": "20241225192802-4sojmmk",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20241225192802-4sojmmk",
"updated": "20241225192808"
},
"Children": [
{
"ID": "20241225192802-0rma1gp",
"Type": "NodeParagraph",
"Properties": {
"id": "20241225192802-0rma1gp",
"updated": "20241225192808"
},
"Children": [
{
Expand All @@ -870,11 +943,11 @@
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": "runeLen"
"TextMarkTextContent": "wordCount"
},
{
"Type": "NodeText",
"Data": "​: This function is used to return the string length"
"Data": "​: This function is used to return the number of words in a string"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"id": "20201204181006-7bkppue",
"title": "模板片段",
"type": "doc",
"updated": "20241224162826"
"updated": "20241225192538"
},
"Children": [
{
Expand Down Expand Up @@ -69,7 +69,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20210104091309-fhb549c",
"updated": "20241224162826"
"updated": "20241225192538"
},
"Children": [
{
Expand Down Expand Up @@ -237,7 +237,7 @@
"ListData": {},
"Properties": {
"id": "20210104091309-gjkg3u5",
"updated": "20241224162826"
"updated": "20241225192538"
},
"Children": [
{
Expand Down Expand Up @@ -271,7 +271,15 @@
},
{
"Type": "NodeText",
"Data": "​:该变量用于插入当前文档名。比如模板内容为 "
"Data": "​:该变量用于插入当前文档名。比如"
},
{
"Type": "NodeText",
"Data": "模板"
},
{
"Type": "NodeText",
"Data": "内容为 "
},
{
"Type": "NodeTextMark",
Expand Down Expand Up @@ -465,7 +473,15 @@
},
{
"Type": "NodeText",
"Data": "​:该函数用于查询数据库,返回值为 blocks 列表"
"Data": "​:该函数用于查询"
},
{
"Type": "NodeText",
"Data": "数据库"
},
{
"Type": "NodeText",
"Data": ",返回值为 blocks 列表"
}
]
},
Expand All @@ -475,6 +491,7 @@
"IsFencedCodeBlock": true,
"Properties": {
"id": "20210604111446-p6vadfc",
"style": "line-height: 22px;",
"updated": "20241213215118"
},
"Children": [
Expand Down Expand Up @@ -528,7 +545,15 @@
},
{
"Type": "NodeText",
"Data": "​:该函数用于查询数据库,返回值为 spans 列表"
"Data": "​:该函数用于查询"
},
{
"Type": "NodeText",
"Data": "数据库"
},
{
"Type": "NodeText",
"Data": ",返回值为 spans 列表"
}
]
},
Expand All @@ -538,6 +563,7 @@
"IsFencedCodeBlock": true,
"Properties": {
"id": "20241213215337-rhkoc8k",
"style": "line-height: 22px;",
"updated": "20241224162826"
},
"Children": [
Expand Down Expand Up @@ -591,7 +617,15 @@
},
{
"Type": "NodeText",
"Data": "​:该函数用于查询数据库,返回值为结果集"
"Data": "​:该函数用于查询"
},
{
"Type": "NodeText",
"Data": "数据库"
},
{
"Type": "NodeText",
"Data": ",返回值为结果集"
}
]
},
Expand All @@ -601,6 +635,7 @@
"IsFencedCodeBlock": true,
"Properties": {
"id": "20241213215240-f33bsqs",
"style": "line-height: 22px;",
"updated": "20241213215421"
},
"Children": [
Expand Down Expand Up @@ -664,6 +699,7 @@
"IsFencedCodeBlock": true,
"Properties": {
"id": "20241212101810-6ffociu",
"style": "line-height: 22px;",
"updated": "20241213215655"
},
"Children": [
Expand Down Expand Up @@ -882,7 +918,44 @@
"Type": "NodeParagraph",
"Properties": {
"id": "20241212163704-i9p11h6",
"updated": "20241212163739"
"updated": "20241225192521"
},
"Children": [
{
"Type": "NodeText",
"Data": "​"
},
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": "runeCount"
},
{
"Type": "NodeText",
"Data": "​:该函数用于返回字符串中的字符数"
}
]
}
]
},
{
"ID": "20241225192524-3b660ss",
"Type": "NodeListItem",
"ListData": {
"BulletChar": 42,
"Marker": "Kg=="
},
"Properties": {
"id": "20241225192524-3b660ss",
"updated": "20241225192538"
},
"Children": [
{
"ID": "20241225192524-vyuve5f",
"Type": "NodeParagraph",
"Properties": {
"id": "20241225192524-vyuve5f",
"updated": "20241225192538"
},
"Children": [
{
Expand All @@ -892,11 +965,11 @@
{
"Type": "NodeTextMark",
"TextMarkType": "code",
"TextMarkTextContent": "runeLen"
"TextMarkTextContent": "wordCount"
},
{
"Type": "NodeText",
"Data": "​:该函数用于返回字符串长度"
"Data": "​:该函数用于返回字符串中的字数"
}
]
}
Expand Down
Loading

0 comments on commit 2f1885b

Please sign in to comment.