(edge: WireFlowEdge)
| 318 | * carries the untruncated text. |
| 319 | */ |
| 320 | export function labelLinesFor(edge: WireFlowEdge): string[] { |
| 321 | return shortenSites(edge.label) |
| 322 | .split(' \u00b7 ') |
| 323 | .map((part) => part.trim()) |
| 324 | .filter(Boolean) |
| 325 | .map((part) => |
| 326 | part.length > LABEL_MAX_CHARS ? `${part.slice(0, LABEL_MAX_CHARS - 1)}\u2026` : part |
| 327 | ); |
| 328 | } |
| 329 | |
| 330 | /** `line 2029`, or null when the edge carries no line. */ |
| 331 | export function lineLabelFor(edge: WireFlowEdge): string | null { |
no test coverage detected