🎨 Element attribute names are uniformly lowercase English letters https://github.com/siyuan-note/siyuan/issues/16604 (#16657)

部分属性名大写字母改为小写

兼容旧版带大写字母的属性名

更新用户指南说明

优化性能

统一前后端验证属性名的逻辑

改进验证属性名格式报错信息
This commit is contained in:
Jeffrey Chen 2025-12-22 09:43:12 +08:00 committed by GitHub
parent e1f6b83d35
commit 2d1618e639
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 10420 additions and 10359 deletions

View file

@ -245,9 +245,14 @@ func Export2Liandi(id string) (err error) {
defer util.PushClearMsg(msgId)
// 判断帖子是否已经存在,存在则使用更新接口
const liandiArticleIdAttrName = "custom-liandi-articleId"
const liandiArticleIdAttrName = "custom-liandi-articleid"
const liandiArticleIdAttrNameOld = "custom-liandi-articleId" // 兼容旧属性名
foundArticle := false
// 优先使用新属性名,如果不存在则尝试旧属性名
articleId := tree.Root.IALAttr(liandiArticleIdAttrName)
if "" == articleId {
articleId = tree.Root.IALAttr(liandiArticleIdAttrNameOld)
}
if "" != articleId {
result := gulu.Ret.NewResult()
request := httpclient.NewCloudRequest30s()