Spaces:
Paused
Paused
Update frontend/src/components/playground.tsx
Browse files
frontend/src/components/playground.tsx
CHANGED
|
@@ -49,7 +49,7 @@ function renderMarkdown(text: string): string {
|
|
| 49 |
.replace(/\*\*\*(.+?)\*\*\*/g, '<strong><em>$1</em></strong>')
|
| 50 |
.replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>')
|
| 51 |
.replace(/_(.+?)_/g, '<em>$1</em>')
|
| 52 |
-
.replace(/`([^`]+)`/g, '<code>$1</code>')
|
| 53 |
.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" target="_blank" rel="noopener">$1</a>')
|
| 54 |
.replace(/^---+$/gm, '<hr/>')
|
| 55 |
.replace(/\n/g, '<br/>');
|
|
|
|
| 49 |
.replace(/\*\*\*(.+?)\*\*\*/g, '<strong><em>$1</em></strong>')
|
| 50 |
.replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>')
|
| 51 |
.replace(/_(.+?)_/g, '<em>$1</em>')
|
| 52 |
+
.replace(/`([^`]+)`/g, '<code style="white-space: pre-wrap; word-wrap: break-word;">$1</code>')
|
| 53 |
.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" target="_blank" rel="noopener">$1</a>')
|
| 54 |
.replace(/^---+$/gm, '<hr/>')
|
| 55 |
.replace(/\n/g, '<br/>');
|