(md: string)
| 1 | export const escapeMarkdown = (md: string): string => { |
| 2 | return md.replaceAll(/[*_~\-#`[\]()\\]/g, (ch) => `\\${ch}`); |
| 3 | }; |
| 4 | |
| 5 | // Matches the Go `strings.TrimSpace` / `unicode.IsSpace` predicate so that |
| 6 | // the frontend's empty-title decision agrees with the backend. |
no outgoing calls
no test coverage detected