mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-12-03 23:28:05 +00:00
Add backlinks counter
This commit is contained in:
committed by
Timur Ismagilov
parent
7c41403eee
commit
b469b8f57d
@@ -52,6 +52,13 @@ func IndexBacklinks() {
|
||||
}
|
||||
}
|
||||
|
||||
func BacklinksCount(h *Hypha) int {
|
||||
if _, exists := backlinkIndex[h.Name]; exists {
|
||||
return len(backlinkIndex[h.Name])
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func BacklinksOnEdit(h *Hypha, oldText string) {
|
||||
backlinkIndexMutex.Lock()
|
||||
newLinks := toLinkSet(ExtractHyphaLinks(h))
|
||||
|
||||
Reference in New Issue
Block a user