(withMarkdown: string)
| 103 | |
| 104 | const markdownRegex = /^\s*(```json)?((.|\n)*?)(```)?\s*$/i; |
| 105 | function maybeStripMarkdown(withMarkdown: string) { |
| 106 | const mdMatch = markdownRegex.exec(withMarkdown); |
| 107 | if (!mdMatch) { |
| 108 | return withMarkdown; |
| 109 | } |
| 110 | return mdMatch[2]; |
| 111 | } |