* Escape text for use inside an MDX table cell.
(text: string)
| 3061 | * Escape text for use inside an MDX table cell. |
| 3062 | */ |
| 3063 | function escapeMdxCell(text: string): string { |
| 3064 | return text |
| 3065 | .replace(/\|/g, '\\|') |
| 3066 | .replace(/\{/g, '\\{') |
| 3067 | .replace(/\}/g, '\\}') |
| 3068 | .replace(/\(/g, '\\(') |
| 3069 | .replace(/\)/g, '\\)') |
| 3070 | .replace(/\[/g, '\\[') |
| 3071 | .replace(/\]/g, '\\]') |
| 3072 | .replace(/</g, '<') |
| 3073 | .replace(/>/g, '>') |
| 3074 | } |
| 3075 | |
| 3076 | /** |
| 3077 | * Resolve a module-level `const varName = { ... }` declaration. |
no test coverage detected