MCPcopy Create free account
hub / github.com/markdoc/markdoc / convertToRow

Function convertToRow

src/transforms/table.ts:5–12  ·  view source on GitHub ↗
(node: Node, cellType: NodeType = 'td')

Source from the content-addressed store, hash-verified

3import type { Node, NodeType, ValidationError } from '../types';
4
5function convertToRow(node: Node, cellType: NodeType = 'td') {
6 node.type = 'tr';
7 node.attributes = {};
8
9 for (const cell of node.children) cell.type = cellType;
10
11 return node;
12}
13
14function isConditionalTag(node: Node, conditionalTags: string[]) {
15 return (

Callers 1

transformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected