(content: string)
| 267 | } |
| 268 | |
| 269 | function convertCodeSnippetsToMarkdown(content: string): string { |
| 270 | // Convert CodeSnippet components to regular markdown code blocks |
| 271 | return content.replace( |
| 272 | /<CodeSnippet\s+title="([^"]*)"[^>]*>\s*```(\w+)?\n([\s\S]*?)\n```\s*<\/CodeSnippet>/g, |
| 273 | (match, title, language, code) => { |
| 274 | const lang = language || "typescript" |
| 275 | return `${title ? `### ${title}\n\n` : ""}\`\`\`${lang}\n${code}\n\`\`\`\n\n` |
| 276 | } |
| 277 | ) |
| 278 | } |
| 279 | |
| 280 | function convertTablesToMarkdown(content: string): string { |
| 281 | // Convert JSX tables to proper markdown tables |
no outgoing calls
no test coverage detected