MCPcopy Index your code
hub / github.com/simstudioai/sim / wrapInEnml

Function wrapInEnml

apps/sim/app/api/tools/evernote/lib/client.ts:431–441  ·  view source on GitHub ↗

Wrap content in ENML if it's not already

(content: string)

Source from the content-addressed store, hash-verified

429
430/** Wrap content in ENML if it's not already */
431function wrapInEnml(content: string): string {
432 if (content.includes('<!DOCTYPE en-note')) {
433 return content
434 }
435 const escaped = content
436 .replace(/&/g, '&amp;')
437 .replace(/</g, '&lt;')
438 .replace(/>/g, '&gt;')
439 .replace(/\n/g, '<br/>')
440 return `<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note>${escaped}</en-note>`
441}
442
443export async function createNote(
444 token: string,

Callers 2

createNoteFunction · 0.85
updateNoteFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected