mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
10690ba3f7
3 changed files with 6 additions and 9 deletions
|
|
@ -77,7 +77,10 @@ func getAttributeViewAddingBlockDefaultValues(c *gin.Context) {
|
|||
}
|
||||
|
||||
avID := arg["avID"].(string)
|
||||
viewID := arg["viewID"].(string)
|
||||
var viewID string
|
||||
if viewIDArg := arg["viewID"]; nil != viewIDArg {
|
||||
viewID = viewIDArg.(string)
|
||||
}
|
||||
var groupID string
|
||||
if groupIDArg := arg["groupID"]; nil != groupIDArg {
|
||||
groupID = groupIDArg.(string)
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ func GetAttrViewAddingBlockDefaultValues(avID, viewID, groupID, previousBlockID,
|
|||
return
|
||||
}
|
||||
|
||||
view := attrView.GetView(viewID)
|
||||
view, _ := attrView.GetCurrentView(viewID)
|
||||
if nil == view {
|
||||
logging.LogErrorf("view [%s] not found in attribute view [%s]", viewID, avID)
|
||||
return
|
||||
|
|
|
|||
|
|
@ -2283,8 +2283,7 @@ func exportTree(tree *parse.Tree, wysiwyg, keepFold, avHiddenCol bool,
|
|||
case 2: // 锚文本块链
|
||||
blockRefLink := &ast.Node{Type: ast.NodeTextMark, TextMarkTextContent: linkText, TextMarkAHref: "siyuan://blocks/" + defID}
|
||||
blockRefLink.KramdownIAL = n.KramdownIAL
|
||||
// 除了块引还有其他元素 https://github.com/siyuan-note/siyuan/issues/15698
|
||||
blockRefLink.TextMarkType = strings.TrimSpace(strings.ReplaceAll(n.TextMarkType, "block-ref", "a"))
|
||||
blockRefLink.TextMarkType = "a " + n.TextMarkType
|
||||
blockRefLink.TextMarkInlineMemoContent = n.TextMarkInlineMemoContent
|
||||
n.InsertBefore(blockRefLink)
|
||||
unlinks = append(unlinks, n)
|
||||
|
|
@ -2334,11 +2333,6 @@ func exportTree(tree *parse.Tree, wysiwyg, keepFold, avHiddenCol bool,
|
|||
n.InsertBefore(&ast.Node{Type: ast.NodeFootnotesRef, Tokens: []byte("^" + refFoot.refNum), FootnotesRefId: refFoot.refNum, FootnotesRefLabel: []byte("^" + refFoot.refNum)})
|
||||
unlinks = append(unlinks, n)
|
||||
}
|
||||
|
||||
if nil != n.Next && ast.NodeKramdownSpanIAL == n.Next.Type {
|
||||
// 引用加排版标记(比如颜色)重叠时丢弃后面的排版属性节点
|
||||
unlinks = append(unlinks, n.Next)
|
||||
}
|
||||
return ast.WalkSkipChildren
|
||||
})
|
||||
for _, n := range unlinks {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue