(data: NonNullable<TranscriptEntry['pluginCommandData']>)
| 328 | } |
| 329 | |
| 330 | function formatPluginCommandSlash(data: NonNullable<TranscriptEntry['pluginCommandData']>): string | undefined { |
| 331 | const name = `${data.pluginId}:${data.commandName}`; |
| 332 | const args = singleLine(data.args ?? ''); |
| 333 | if (name.length === 0) return undefined; |
| 334 | return args.length > 0 ? `/${name} ${args}` : `/${name}`; |
| 335 | } |
| 336 | |
| 337 | function singleLine(text: string): string { |
| 338 | return text.replaceAll(/\s+/g, ' ').trim(); |
no test coverage detected