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

This commit is contained in:
Vanessa 2024-05-23 17:15:03 +08:00
commit aaeda056fa
6 changed files with 291 additions and 9 deletions

View file

@ -7,7 +7,7 @@
"id": "20200924100950-9op5xi1",
"title": "Shortcuts",
"type": "doc",
"updated": "20240517003750"
"updated": "20240523114032"
},
"Children": [
{
@ -16,7 +16,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20201227133532-44ubczo",
"updated": "20240517003750"
"updated": "20240523114032"
},
"Children": [
{
@ -40,7 +40,7 @@
"Properties": {
"colgroup": "||",
"id": "20210106154101-qrojg1b",
"updated": "20240426100644"
"updated": "20240523114032"
},
"Children": [
{
@ -1296,6 +1296,96 @@
}
]
},
{
"Type": "NodeTableRow",
"Data": "tr",
"Children": [
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "Unsplit"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "-"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "Go to "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
"TextMarkTextContent": "Settings - Shortcuts"
},
{
"Type": "NodeText",
"Data": " to configure"
}
]
}
]
},
{
"Type": "NodeTableRow",
"Data": "tr",
"Children": [
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "Unsplit All"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "-"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "Go to "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
"TextMarkTextContent": "Settings - Shortcuts"
},
{
"Type": "NodeText",
"Data": " to configure"
}
]
}
]
},
{
"Type": "NodeTableRow",
"Data": "tr",

View file

@ -7,7 +7,7 @@
"id": "20200813004551-gm0pbn1",
"title": "快捷键",
"type": "doc",
"updated": "20240517004202"
"updated": "20240523113529"
},
"Children": [
{
@ -16,7 +16,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20240112150737-e41yt1y",
"updated": "20240517004202"
"updated": "20240523113529"
},
"Children": [
{
@ -36,7 +36,7 @@
"Properties": {
"colgroup": "||",
"id": "20201227133317-ovwnk1y",
"updated": "20240517004202"
"updated": "20240523113529"
},
"Children": [
{
@ -1294,6 +1294,96 @@
}
]
},
{
"Type": "NodeTableRow",
"Data": "tr",
"Children": [
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "取消分屏"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "-"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "可前往 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
"TextMarkTextContent": "设置 - 快捷键"
},
{
"Type": "NodeText",
"Data": " 中配置"
}
]
}
]
},
{
"Type": "NodeTableRow",
"Data": "tr",
"Children": [
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "取消全部分屏"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "-"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "可前往 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
"TextMarkTextContent": "设置 - 快捷键"
},
{
"Type": "NodeText",
"Data": " 中配置"
}
]
}
]
},
{
"Type": "NodeTableRow",
"Data": "tr",

View file

@ -7,7 +7,7 @@
"id": "20211226122549-jktxego",
"title": "快捷鍵",
"type": "doc",
"updated": "20240517004210"
"updated": "20240523113830"
},
"Children": [
{
@ -16,7 +16,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20211226122652-0t4c1qf",
"updated": "20240517004210"
"updated": "20240523113830"
},
"Children": [
{
@ -36,7 +36,7 @@
"Properties": {
"colgroup": "||",
"id": "20211226122652-4e9hm9i",
"updated": "20240517004210"
"updated": "20240523113830"
},
"Children": [
{
@ -1288,6 +1288,96 @@
}
]
},
{
"Type": "NodeTableRow",
"Data": "tr",
"Children": [
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "取消並排分頁"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "-"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "可前往 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
"TextMarkTextContent": "設置 - 快捷鍵"
},
{
"Type": "NodeText",
"Data": " 中配置"
}
]
}
]
},
{
"Type": "NodeTableRow",
"Data": "tr",
"Children": [
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "取消全部並排分頁"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "-"
}
]
},
{
"Type": "NodeTableCell",
"Data": "td",
"Children": [
{
"Type": "NodeText",
"Data": "可前往 "
},
{
"Type": "NodeTextMark",
"TextMarkType": "kbd",
"TextMarkTextContent": "設置 - 快捷鍵"
},
{
"Type": "NodeText",
"Data": " 中配置"
}
]
}
]
},
{
"Type": "NodeTableRow",
"Data": "tr",

View file

@ -93,6 +93,10 @@ func renderOutline(heading *ast.Node, luteEngine *lute.Lute) (ret string) {
}
func renderBlockText(node *ast.Node, excludeTypes []string) (ret string) {
if nil == node {
return
}
ret = sql.NodeStaticContent(node, excludeTypes, false, false, false, GetBlockAttrsWithoutWaitWriting)
ret = strings.TrimSpace(ret)
ret = strings.ReplaceAll(ret, "\n", "")

View file

@ -139,6 +139,10 @@ func indexNode(tx *sql.Tx, id string) (err error) {
func NodeStaticContent(node *ast.Node, excludeTypes []string, includeTextMarkATitleURL, includeAssetPath, fullAttrView bool,
GetBlockAttrsWithoutWaitWriting func(id string) (ret map[string]string)) string {
if nil == node {
return ""
}
if ast.NodeAttributeView == node.Type {
if fullAttrView {
return getAttributeViewContent(node.AttributeViewID, GetBlockAttrsWithoutWaitWriting)

View file

@ -812,6 +812,10 @@ func GetContainerText(container *ast.Node) string {
buf := &bytes.Buffer{}
buf.Grow(4096)
leaf := treenode.FirstLeafBlock(container)
if nil == leaf {
return ""
}
ast.Walk(leaf, func(n *ast.Node, entering bool) ast.WalkStatus {
if !entering {
return ast.WalkContinue