Skip to content

Commit 2d42b85

Browse files
high lighting text that may not work
1 parent 8a8afbd commit 2d42b85

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/components/ChatMessage.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,9 @@
295295
296296
// Handle other markdown formatting and convert newlines to br for non-code content
297297
result = result
298-
// Handle bold code blocks first (removes backticks when inside bold)
299-
.replace(/\*\*`([^`]+)`\*\*/g, '<strong>$1</strong>')
300-
// Then handle regular inline code
298+
// Handle bold text that contains backticks (remove backticks but keep bold)
299+
.replace(/\*\*([^*]*)`([^`]+)`([^*]*)\*\*/g, '<strong>$1$2$3</strong>')
300+
// Handle regular inline code (keep code highlighting)
301301
.replace(
302302
/`([^`]+)`/g,
303303
'<code class="bg-surface-200-700-token text-surface-700-200-token px-1 rounded ">$1</code>'

0 commit comments

Comments
 (0)