MCPcopy Create free account
hub / github.com/adobe/react-spectrum / endLine

Function endLine

packages/dev/s2-docs/src/Code.tsx:197–214  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

195 let grouping: HastNode | null = null;
196 let skip = false;
197 let endLine = () => {
198 if (skip) {
199 skip = false;
200 currentLine = [];
201 return;
202 }
203 let childNode = {
204 type: 'element',
205 tagName: 'div',
206 children: [{...node, children: currentLine}]
207 } as HastNode;
208 if (grouping) {
209 grouping.children.push(childNode);
210 } else {
211 resultLines.push(childNode);
212 }
213 currentLine = [];
214 };
215
216 for (let child of node.children) {
217 if (child.type === 'text' && 'value' in child) {

Callers 1

linesFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected