mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Fix autopunctuation issues. (#6578)
Autopunctuation will no longer autopunctuate if markup (* or /) is present at the end of the sentence. It will also no longer input an empty period if you put nothing in the chat box. Fixes #6536
This commit is contained in:
@@ -161,6 +161,11 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
|
||||
var/message_mode = parse_message_mode(message, "headset")
|
||||
|
||||
var/static/list/correct_punctuation = list("!" = TRUE, "." = TRUE, "?" = TRUE, "-" = TRUE, "~" = TRUE, "*" = TRUE, "/" = TRUE)
|
||||
var/ending = copytext(message, length(message), (length(message) + 1))
|
||||
if(ending && !correct_punctuation[ending])
|
||||
message += "."
|
||||
|
||||
message = process_chat_markup(message, list("~", "_"))
|
||||
|
||||
switch(copytext(message,1,2))
|
||||
@@ -176,10 +181,6 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
|
||||
message = trim_left(message)
|
||||
|
||||
var/ending = copytext(message, length(message), (length(message) + 1))
|
||||
if(ending != "!" && ending != "." && ending != "?" && ending != "-")
|
||||
message += "."
|
||||
|
||||
//parse the language code and consume it
|
||||
if(!speaking)
|
||||
speaking = parse_language(message)
|
||||
|
||||
Reference in New Issue
Block a user