MCPcopy
hub / github.com/marktext/marktext / hasCodeChild

Function hasCodeChild

packages/website/src/lib/markdown.ts:322–324  ·  view source on GitHub ↗
(node: Element)

Source from the content-addressed store, hash-verified

320}
321
322function hasCodeChild(node: Element): boolean {
323 return node.children.some((c) => c.type === 'element' && c.tagName === 'code')
324}
325
326function wrapCodeBlock(pre: Element): Element {
327 const code = pre.children.find((c) => c.type === 'element' && c.tagName === 'code') as

Callers 1

transformTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected