mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
🎨 嵌入块纳入引用计数和反链 https://github.com/siyuan-note/siyuan/issues/7096
This commit is contained in:
parent
6afa767f01
commit
492aabcf22
8 changed files with 117 additions and 50 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue