MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / localAssetTargetKind

Function localAssetTargetKind

apps/server/internal/vault/parse.go:214–228  ·  view source on GitHub ↗
(target string)

Source from the content-addressed store, hash-verified

212}
213
214func localAssetTargetKind(target string) string {
215 clean := target
216 if i := strings.IndexAny(clean, "#?"); i >= 0 {
217 clean = clean[:i]
218 }
219 dot := strings.LastIndexByte(clean, '.')
220 if dot < 0 {
221 return ""
222 }
223 ext := strings.ToLower(clean[dot:])
224 if attachmentExts[ext] {
225 return ext
226 }
227 return ""
228}
229
230// --- Task parsing (mirrors shared/tasks.ts parseTasksFromBody) ---
231

Callers 2

ExtractWikilinksFunction · 0.70
BodyHasLocalAssetFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected