(text: string)
| 1179 | } |
| 1180 | |
| 1181 | function getTrailingInlineSeparator(text: string): string { |
| 1182 | if (!text) return ""; |
| 1183 | const trailingWhitespace = text.match(/[\t\n\f\r ]+$/)?.[0] ?? ""; |
| 1184 | const prefix = text.slice(0, text.length - trailingWhitespace.length); |
| 1185 | const punctuationMatch = prefix.match(/(?:[,;:/|]\s*)+$/)?.[0] ?? ""; |
| 1186 | if (punctuationMatch) { |
| 1187 | return punctuationMatch + trailingWhitespace; |
| 1188 | } |
| 1189 | return trailingWhitespace; |
| 1190 | } |
| 1191 | |
| 1192 | function extractInlineDuplicateSeparator(source: string, nodePath: any): string { |
| 1193 | const parentChildren = nodePath.parent?.node?.children; |
no outgoing calls
no test coverage detected