MCPcopy Index your code
hub / github.com/markmap/markmap / wrapHtml

Function wrapHtml

packages/markmap-common/src/html.ts:39–46  ·  view source on GitHub ↗
(
  tagName: string,
  content?: string | null,
  attrs?: Record<string, string | boolean>,
)

Source from the content-addressed store, hash-verified

37}
38
39export function wrapHtml(
40 tagName: string,
41 content?: string | null,
42 attrs?: Record<string, string | boolean>,
43): string {
44 if (content == null) return htmlOpen(tagName, attrs);
45 return htmlOpen(tagName, attrs) + (content || '') + htmlClose(tagName);
46}
47
48export function buildCode<T extends unknown[]>(
49 fn: (...args: T) => void,

Callers 2

persistJSFunction · 0.85
persistCSSFunction · 0.85

Calls 2

htmlOpenFunction · 0.85
htmlCloseFunction · 0.85

Tested by

no test coverage detected