mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
cd6b560de8
1 changed files with 9 additions and 1 deletions
|
|
@ -1176,7 +1176,15 @@ func (tx *Transaction) doInsert(operation *Operation) (ret *TxErr) {
|
||||||
v := attrView.GetView(attrView.ViewID)
|
v := attrView.GetView(attrView.ViewID)
|
||||||
if nil != v {
|
if nil != v {
|
||||||
insertedNode.AttributeViewType = string(v.LayoutType)
|
insertedNode.AttributeViewType = string(v.LayoutType)
|
||||||
insertedNode.SetIALAttr(av.NodeAttrView, v.ID)
|
attrs := parse.IAL2Map(insertedNode.KramdownIAL)
|
||||||
|
if "" == attrs[av.NodeAttrView] {
|
||||||
|
attrs[av.NodeAttrView] = v.ID
|
||||||
|
err = setNodeAttrs(insertedNode, tree, attrs)
|
||||||
|
if err != nil {
|
||||||
|
logging.LogWarnf("set node [%s] attrs failed: %s", operation.BlockID, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue