(child: any, source?: string, lineStarts?: number[])
| 787 | } |
| 788 | |
| 789 | function getRenderedChildText(child: any, source?: string, lineStarts?: number[]): string { |
| 790 | if (child.type === "JSXText") return collapseRenderedWhitespace(child.value); |
| 791 | if (child.type === "JSXElement") return getRenderedElementText(child, source, lineStarts); |
| 792 | if (child.type === "JSXExpressionContainer") { |
| 793 | const expr = child.expression; |
| 794 | if (expr?.type === "StringLiteral" || expr?.type === "Literal") { |
| 795 | return collapseRenderedWhitespace(String(expr.value ?? "")); |
| 796 | } |
| 797 | } |
| 798 | return ""; |
| 799 | } |
| 800 | |
| 801 | function needsBoundarySpace(previousText: string, nextText: string, sourceBetween: string): boolean { |
| 802 | if (!previousText || !nextText) return false; |
no test coverage detected