(normalized: any[], upcomingChild?: any)
| 957 | } |
| 958 | |
| 959 | function insertSingleVisibleBoundarySpace(normalized: any[], upcomingChild?: any): void { |
| 960 | const previous = normalized[normalized.length - 1]; |
| 961 | if (!previous) return; |
| 962 | |
| 963 | const previousIsPlainText = previous.type === "JSXText"; |
| 964 | const upcomingIsPlainText = upcomingChild?.type === "JSXText"; |
| 965 | |
| 966 | if (previousIsPlainText && upcomingIsPlainText) { |
| 967 | if (appendToChildText(previous, " ")) return; |
| 968 | if (upcomingChild && prependToChildText(upcomingChild, " ")) return; |
| 969 | } |
| 970 | |
| 971 | normalized.push(createSpaceExpressionNode()); |
| 972 | } |
| 973 | |
| 974 | function canonicalizeEditedTextSubtree(node: any, source?: string, lineStarts = source ? getLineStarts(source) : undefined): void { |
| 975 | const children = node.children; |
no test coverage detected