🎨 嵌入块纳入引用计数和反链 https://github.com/siyuan-note/siyuan/issues/7096

This commit is contained in:
Liang Ding 2023-01-17 22:16:14 +08:00
parent 6afa767f01
commit 492aabcf22
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
8 changed files with 117 additions and 50 deletions

View file

@ -52,40 +52,6 @@ func ShortPathForBootingDisplay(p string) string {
return p
}
func IsIDPattern(str string) bool {
if len("20060102150405-1a2b3c4") != len(str) {
return false
}
if 1 != strings.Count(str, "-") {
return false
}
parts := strings.Split(str, "-")
idPart := parts[0]
if 14 != len(idPart) {
return false
}
for _, c := range idPart {
if !('0' <= c && '9' >= c) {
return false
}
}
randPart := parts[1]
if 7 != len(randPart) {
return false
}
for _, c := range randPart {
if !('a' <= c && 'z' >= c) && !('0' <= c && '9' >= c) {
return false
}
}
return true
}
var LocalIPs []string
func GetLocalIPs() (ret []string) {