From 897cd333b91868b6bdb51f7f3285647271cbc092 Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Wed, 10 Jan 2024 15:58:10 +0000 Subject: [PATCH] remove instruction removed replace() that removes **...** --- src/interface.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interface.js b/src/interface.js index 523417c..a051638 100644 --- a/src/interface.js +++ b/src/interface.js @@ -158,7 +158,7 @@ async function processStream(stream) { if (done) { console.log('Stream closed.'); - document.querySelector(".message:last-child").querySelector(".message-text").innerHTML = document.querySelector(".message:last-child").querySelector(".message-text").innerHTML.replace(/```([\s\S]+?)```/g, '
$1
').replace(/\*\*.*?\*\*/g, '');; + document.querySelector(".message:last-child").querySelector(".message-text").innerHTML = document.querySelector(".message:last-child").querySelector(".message-text").innerHTML.replace(/```([\s\S]+?)```/g, '
$1
'); //hljs.highlightAll(); document.querySelector(".message:last-child").querySelector(".message-text").querySelectorAll('pre code').forEach((block) => { hljs.highlightElement(block);