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

Function findLink

packages/dev/parcel-transformer-mdx-docs/MDXTransformer.js:247–260  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

245 }).map;
246
247 function findLink(node) {
248 if (node.type === 'link') {
249 return node;
250 }
251
252 if (node.children) {
253 for (let child of node.children) {
254 let link = findLink(child);
255 if (link) {
256 return link;
257 }
258 }
259 }
260 }
261
262 /**
263 * Go from complex structure that the mdx plugin renders from to a simpler one

Callers 1

treeConverterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected