(line: PseudocodeLine)
| 199 | * highlight; the editor still follows it, which is where that fact lives. |
| 200 | */ |
| 201 | export function flowHighlightOf(line: PseudocodeLine): FlowHighlight { |
| 202 | if (line.kind !== 'step') { |
| 203 | return {}; |
| 204 | } |
| 205 | // Sanitised exactly as the builder sanitises them, so what is compared is |
| 206 | // the string the drawing actually holds rather than the one the fact did. |
| 207 | return { |
| 208 | participant: line.targetFile === undefined ? undefined : sanitizeLabel(baseNameOf(line.targetFile)), |
| 209 | message: line.targetName === undefined ? undefined : sanitizeLabel(line.targetName), |
| 210 | }; |
| 211 | } |
| 212 | |
| 213 | /** The last path segment of a URI, which is what a lifeline is labelled with. */ |
| 214 | export function baseNameOf(uri: string): string { |
no test coverage detected