modified: templates/chat.html
This commit is contained in:
parent
31a2f306e1
commit
b778c7e53c
1 changed files with 3 additions and 0 deletions
|
|
@ -461,6 +461,9 @@ socket.on("message_updated", (data) => {
|
|||
messageContentContainer.innerHTML = DOMPurify.sanitize(marked.marked(data.content), dompurify_config);
|
||||
}
|
||||
|
||||
// Update the raw markdown stored in the data attribute
|
||||
messageContentContainer.dataset.rawMarkdown = data.content;
|
||||
|
||||
// Apply syntax highlighting and other functionalities to code blocks within the message
|
||||
messageContentContainer.querySelectorAll("pre code").forEach((block) => {
|
||||
addCopyButtonToCodeBlock(block);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue