MCPcopy Index your code
hub / github.com/UNLINEARITY/Obsidian-CodeSpace / rememberSourcePath

Function rememberSourcePath

src/code_embed.ts:317–321  ·  view source on GitHub ↗
(targetEl: HTMLElement, sourcePath: string)

Source from the content-addressed store, hash-verified

315}
316
317function rememberSourcePath(targetEl: HTMLElement, sourcePath: string) {
318 const trimmed = sourcePath.trim();
319 if (!trimmed || trimmed.startsWith("Untitled")) return;
320 targetEl.setAttribute(CODE_SPACE_SOURCE_PATH_ATTR, trimmed);
321}
322
323function getRememberedSourcePath(embedEl: HTMLElement): string {
324 return embedEl.closest<HTMLElement>(`[${CODE_SPACE_SOURCE_PATH_ATTR}]`)?.getAttribute(CODE_SPACE_SOURCE_PATH_ATTR) ?? "";

Callers 9

onloadMethod · 0.85
processEmbedsMethod · 0.85
queueCodeEmbedsInElementFunction · 0.85
scheduleProcessCodeEmbedFunction · 0.85
processCodeEmbedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected