Fixes bold/italics rendering in emotes and saved chatlog MIME type (#22577)

format_emote has to come first, otherwise it will re-encode the markup
into literals. however, the langchat_message does not want to have
format_emote called on it. ergo, we have to either process the markup
twice, once for each path, or we have to accept that one of the two will
not support bold/italics. the perf from doing it twice is completely
inconsequential

<img width="299" height="150" alt="image"
src="https://github.com/user-attachments/assets/4a34a0ae-6895-4275-be53-586820fd5b7d"
/>


- bugfix: "Saved chat logs are now written with the correct text/html
file type."
- bugfix: "Emote markup like *bold* and /italics/ once again renders in
chat instead of showing literal tags."
This commit is contained in:
lew
2026-06-03 15:24:15 +00:00
committed by GitHub
parent 7df972f470
commit 6a88cb3a19
3 changed files with 8 additions and 3 deletions
+2 -2
View File
@@ -159,9 +159,9 @@
if (message)
log_emote("[name]/[key] : [message]")
message = process_chat_markup(message, list("~", "_"))
var/langchat_message = message
var/langchat_message = process_chat_markup(message, list("~", "_"))
message = format_emote(src, message)
message = process_chat_markup(message, list("~", "_"))
var/list/emote_viewers = list()
if(m_type == VISIBLE_MESSAGE)
visible_message(message, show_observers = do_show_observers)