(text: string)
| 263 | } |
| 264 | |
| 265 | function getCodeFence(text: string): string { |
| 266 | const matches = text.match(/`{3,}/g) |
| 267 | if (!matches) { |
| 268 | return '```' |
| 269 | } |
| 270 | |
| 271 | const length = Math.max(...matches.map(match => match.length)) + 1 |
| 272 | |
| 273 | return '`'.repeat(length) |
| 274 | } |
| 275 | |
| 276 | function getMarkdownFenceLanguage(body: CaptureRequest): string | undefined { |
| 277 | const sourceName |