MCPcopy Create free account
hub / github.com/chhoumann/quickadd / insertBodyIntoNoteContent

Function insertBodyIntoNoteContent

src/engine/TemplateInsertEngine.ts:83–93  ·  view source on GitHub ↗
(
	noteContent: string,
	body: string,
	position: "top" | "bottom",
)

Source from the content-addressed store, hash-verified

81 * extra newline, for tight single-snippet insertion.)
82 */
83export function insertBodyIntoNoteContent(
84 noteContent: string,
85 body: string,
86 position: "top" | "bottom",
87): string {
88 if (position === "bottom") {
89 return `${noteContent}\n${body}`;
90 }
91
92 return insertAtNoteBodyStart(noteContent, `${body}\n`);
93}
94
95/**
96 * Applies a template to an existing note (issue #526). Unlike

Callers 2

Calls 1

insertAtNoteBodyStartFunction · 0.90

Tested by

no test coverage detected