make fenced code blocks work with username
modified: app.py modified: templates/chat.html
This commit is contained in:
parent
62a0d2f6c0
commit
175f49d135
2 changed files with 2 additions and 2 deletions
2
app.py
2
app.py
|
|
@ -111,7 +111,7 @@ def handle_message(data):
|
|||
|
||||
emit(
|
||||
"message",
|
||||
{"id": new_message.id, "content": f"{data['username']}: {data['message']}"},
|
||||
{"id": new_message.id, "content": f"{data['username']}:\n\n{data['message']}"},
|
||||
room=data["room"],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ socket.on('previous_messages', (data) => {
|
|||
messageWrapper.id = "message-" + data.id;
|
||||
|
||||
const newMessage = document.createElement('p');
|
||||
newMessage.innerHTML = marked.marked(`${data.username}: ${data.message}`);
|
||||
newMessage.innerHTML = marked.marked(`${data.username}:\n\n${data.message}`);
|
||||
|
||||
// Create the delete button
|
||||
const deleteButton = document.createElement('button');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue