(prevNode: any, nextNode: any, source?: string, lineStarts?: number[])
| 778 | } |
| 779 | |
| 780 | function getSourceBetween(prevNode: any, nextNode: any, source?: string, lineStarts?: number[]): string { |
| 781 | if (!source) return ""; |
| 782 | const starts = lineStarts ?? getLineStarts(source); |
| 783 | const prevEnd = getNodeIndex(prevNode, "end", starts); |
| 784 | const nextStart = getNodeIndex(nextNode, "start", starts); |
| 785 | if (prevEnd == null || nextStart == null || nextStart < prevEnd) return ""; |
| 786 | return source.slice(prevEnd, nextStart); |
| 787 | } |
| 788 | |
| 789 | function getRenderedChildText(child: any, source?: string, lineStarts?: number[]): string { |
| 790 | if (child.type === "JSXText") return collapseRenderedWhitespace(child.value); |
no test coverage detected