Skip to content

Commit f7589b5

Browse files
committed
fix: Update regex to support additional language formats in QnAChatInterface
1 parent 7ef03fb commit f7589b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/qna-chat-interface.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ export function QnAChatInterface() {
407407
)
408408
},
409409
code: ({ className, children, ...props }) => {
410-
const match = /language-(\w+)/.exec(className || "")
410+
const match = /language-([\w-]+)/.exec(className || "")
411411
const isChart = match && match[1] === "chart"
412412
const isDiscordWidget = match && match[1] === "discord-widget"
413413

0 commit comments

Comments
 (0)