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

Function endLine

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

Source from the content-addressed store, hash-verified

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

Callers 1

linesFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected