(text: string)
| 156 | * @returns The escaped text safe for use in markdown |
| 157 | */ |
| 158 | export const escapeMarkdown = (text: string): string => { |
| 159 | return text.replace(/[\\`*_{}[\]()#+!|]/g, '\\$&'); |
| 160 | }; |
| 161 | |
| 162 | /** |
| 163 | * Truncates text by max length while preserving whole words when possible. |
no test coverage detected