Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
RedNotSus committed Sep 15, 2024
2 parents e5ddafe + 7e4cfe4 commit d3c0d8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions static/assets/js/ai.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ const getChatResponse = async (incomingChatDiv) => {
const highlightedCode = Prism.highlight(
code,
Prism.languages[language],
language
language,
);
return `<pre><code class="language-${language}">${highlightedCode}</code></pre>`;
}
},
);
html = marked.parse(response.response);
pElement.appendChild(document.createRange().createContextualFragment(html));
Expand All @@ -71,7 +71,7 @@ const copyResponse = (copyBtn) => {
copyBtn.innerHTML = '<i class="fa-solid fa-check"></i>';
setTimeout(
() => (copyBtn.innerHTML = '<i class="fa-regular fa-copy"></i>'),
1000
1000,
);
};

Expand Down

0 comments on commit d3c0d8d

Please sign in to comment.