mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Improve av https://github.com/siyuan-note/siyuan/issues/14511
This commit is contained in:
parent
aaf1d9896a
commit
de8eb72393
6 changed files with 35 additions and 36 deletions
|
|
@ -73,15 +73,14 @@ func checkAttrView(attrView *av.AttributeView, view *av.View) {
|
|||
if v.Type != kv.Key.Type {
|
||||
v.Type = kv.Key.Type
|
||||
if av.KeyTypeBlock == v.Type && nil == v.Block {
|
||||
v.Block = &av.ValueBlock{ID: v.BlockID}
|
||||
v.Block = &av.ValueBlock{}
|
||||
if nil != v.Text {
|
||||
v.Block.Content = v.Text.Content
|
||||
}
|
||||
if "" == v.Block.ID {
|
||||
v.Block.ID = ast.NewNodeID()
|
||||
v.BlockID = v.Block.ID
|
||||
if "" == v.BlockID {
|
||||
v.BlockID = ast.NewNodeID()
|
||||
}
|
||||
createdStr := v.Block.ID[:len("20060102150405")]
|
||||
createdStr := v.BlockID[:len("20060102150405")]
|
||||
created, parseErr := time.ParseInLocation("20060102150405", createdStr, time.Local)
|
||||
if nil == parseErr {
|
||||
v.Block.Created = created.UnixMilli()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue