Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
fe6d68c3e7
4 changed files with 15 additions and 6 deletions
4
app/stage/protyle/js/lute/lute.min.js
vendored
4
app/stage/protyle/js/lute/lute.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@ require (
|
|||
github.com/88250/css v0.1.2
|
||||
github.com/88250/flock v0.8.2
|
||||
github.com/88250/gulu v1.2.3-0.20220916075322-eb117059d70a
|
||||
github.com/88250/lute v1.7.5-0.20220923073346-a1a21c8c7501
|
||||
github.com/88250/lute v1.7.5-0.20220923111910-18fda7ca5ad5
|
||||
github.com/88250/pdfcpu v0.3.13
|
||||
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
|
||||
github.com/ConradIrwin/font v0.0.0-20210318200717-ce8d41cc0732
|
||||
|
|
|
@ -21,6 +21,10 @@ github.com/88250/gulu v1.2.3-0.20220916075322-eb117059d70a h1:qQdnk8clbgA+MXtf5b
|
|||
github.com/88250/gulu v1.2.3-0.20220916075322-eb117059d70a/go.mod h1:I1qBzsksFL2ciGSuqDE7R3XW4BUMrfDgOvSXEk7FsAI=
|
||||
github.com/88250/lute v1.7.5-0.20220923073346-a1a21c8c7501 h1:LbVJjsb3gGe8BL5pFguckOx7vufdYalwuWJDxKPo1rU=
|
||||
github.com/88250/lute v1.7.5-0.20220923073346-a1a21c8c7501/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=
|
||||
github.com/88250/lute v1.7.5-0.20220923091635-33c4e7afab31 h1:YmbhOyyyDif5n1tz2jBgNO9TlGvzS/DiQNEvY/iGmSc=
|
||||
github.com/88250/lute v1.7.5-0.20220923091635-33c4e7afab31/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=
|
||||
github.com/88250/lute v1.7.5-0.20220923111910-18fda7ca5ad5 h1:cQBBeWm8AXo5Y9XE6xS+cz4gycWqlzio6cQZEEhs3UM=
|
||||
github.com/88250/lute v1.7.5-0.20220923111910-18fda7ca5ad5/go.mod h1:cEoBGi0zArPqAsp0MdG9SKinvH/xxZZWXU7sRx8vHSA=
|
||||
github.com/88250/pdfcpu v0.3.13 h1:touMWMZkCGalMIbEg9bxYp7rETM+zwb9hXjwhqi4I7Q=
|
||||
github.com/88250/pdfcpu v0.3.13/go.mod h1:S5YT38L/GCjVjmB4PB84PymA1qfopjEhfhTNQilLpv4=
|
||||
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=
|
||||
|
|
|
@ -1265,11 +1265,15 @@ func resolveFootnotesDefs(refFootnotes *[]*refAsFootnotes, rootID string) (footn
|
|||
continue
|
||||
}
|
||||
defNode := treenode.GetNodeInTree(t, foot.defID)
|
||||
docID := strings.TrimSuffix(path.Base(defNode.Path), ".sy")
|
||||
var nodes []*ast.Node
|
||||
if ast.NodeHeading == defNode.Type {
|
||||
nodes = append(nodes, defNode)
|
||||
children := treenode.HeadingChildren(defNode)
|
||||
nodes = append(nodes, children...)
|
||||
if rootID != docID {
|
||||
// 同文档块引转脚注缩略定义考虑容器块和标题块 https://github.com/siyuan-note/siyuan/issues/5917
|
||||
children := treenode.HeadingChildren(defNode)
|
||||
nodes = append(nodes, children...)
|
||||
}
|
||||
} else if ast.NodeDocument == defNode.Type {
|
||||
docTitle := &ast.Node{ID: defNode.ID, Type: ast.NodeHeading, HeadingLevel: 1}
|
||||
docTitle.AppendChild(&ast.Node{Type: ast.NodeText, Tokens: []byte(defNode.IALAttr("title"))})
|
||||
|
@ -1345,7 +1349,8 @@ func resolveFootnotesDefs(refFootnotes *[]*refAsFootnotes, rootID string) (footn
|
|||
}
|
||||
|
||||
docID := strings.TrimSuffix(path.Base(n.Path), ".sy")
|
||||
if rootID == docID { // 在同一个文档的话缩略显示 https://github.com/siyuan-note/siyuan/issues/3299
|
||||
if rootID == docID {
|
||||
// 同文档块引转脚注缩略定义 https://github.com/siyuan-note/siyuan/issues/3299
|
||||
if text := sql.GetRefText(n.ID); 64 < utf8.RuneCountInString(text) {
|
||||
var unlinkChildren []*ast.Node
|
||||
for c := n.FirstChild; nil != c; c = c.Next {
|
||||
|
|
Loading…
Add table
Reference in a new issue