🎨 Clean code

This commit is contained in:
Daniel 2024-12-17 23:41:54 +08:00
parent 500ac7f039
commit 8692455b05
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -1421,7 +1421,6 @@ func ExportStdMarkdown(id string) string {
var defID string
if treenode.IsBlockLink(n) {
defID = strings.TrimPrefix(n.TextMarkAHref, "siyuan://blocks/")
} else if treenode.IsBlockRef(n) {
defID, _, _ = treenode.GetBlockRef(n)
}
@ -3133,7 +3132,6 @@ func exportPandocConvertZip(baseFolderName string, docPaths []string,
var defID string
if treenode.IsBlockLink(n) {
defID = strings.TrimPrefix(n.TextMarkAHref, "siyuan://blocks/")
} else if treenode.IsBlockRef(n) {
defID, _, _ = treenode.GetBlockRef(n)
}
@ -3268,42 +3266,3 @@ func getExportBlockRefLinkText(blockRef *ast.Node, blockRefTextLeft, blockRefTex
linkText = blockRefTextLeft + linkText + blockRefTextRight
return
}
func getDestViewVal(attrView *av.AttributeView, keyID, blockID string) *av.TableColumn {
rollupKey, _ := attrView.GetKey(keyID)
if nil == rollupKey || nil == rollupKey.Rollup {
return nil
}
relKey, _ := attrView.GetKey(rollupKey.Rollup.RelationKeyID)
if nil == relKey || nil == relKey.Relation {
return nil
}
relVal := attrView.GetValue(relKey.ID, blockID)
if nil == relVal || nil == relVal.Relation {
return nil
}
destAv, _ := av.ParseAttributeView(relKey.Relation.AvID)
if nil == destAv {
return nil
}
destKey, _ := destAv.GetKey(rollupKey.Rollup.KeyID)
if nil == destKey {
return nil
}
destView, _ := destAv.GetCurrentView(destAv.ViewID)
if nil == destView {
return nil
}
destTable := sql.RenderAttributeViewTable(destAv, destView, "")
if nil == destTable {
return nil
}
return destTable.GetColumn(rollupKey.Rollup.KeyID)
}