* The marker is hand-editable on the host, so nothing in it is trusted to be * the type it should be. A non-string author reaching `Note` crashes the pane * outright - the avatar initials call `.split()` on it - so anything that is * not a usable string is treated as no recorded author, which fal
(value: unknown)
| 59 | * the account that posted the comment. |
| 60 | */ |
| 61 | function asString(value: unknown) { |
| 62 | return typeof value === 'string' && value.trim() ? value.trim() : undefined; |
| 63 | } |
| 64 | |
| 65 | export function parseNoteBody(body: string): ParsedNoteBody { |
| 66 | const match = body.match(NOTE_PATTERN); |