From 60f9e97ce5ab6abf474c26e19d69bfe49f966f0a Mon Sep 17 00:00:00 2001
From: silicons <2003111+silicons@users.noreply.github.com>
Date: Fri, 11 Dec 2020 17:31:27 -0700
Subject: [PATCH] test
---
code/game/say.dm | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/code/game/say.dm b/code/game/say.dm
index 5b9b045bf0..61dd9c0879 100644
--- a/code/game/say.dm
+++ b/code/game/say.dm
@@ -96,13 +96,14 @@ GLOBAL_LIST_INIT(freqtospan, list(
return "[say_mod(input, message_mode)][spanned ? ", \"[spanned]\"" : ""]"
// Citadel edit [spanned ? ", \"[spanned]\"" : ""]"
+/// Converts specific characters, like +, |, and _ to formatted output.
/atom/movable/proc/say_emphasis(input)
- var/static/regex/italics = regex("\\|(?=\\S)(.*?)(?=\\S)\\|", "g")
- input = replacetext_char(input, italics, "$1")
- var/static/regex/bold = regex("\\+(?=\\S)(.*?)(?=\\S)\\+", "g")
- input = replacetext_char(input, bold, "$1")
- var/static/regex/underline = regex("_(?=\\S)(.*?)(?=\\S)_", "g")
- input = replacetext_char(input, underline, "$1")
+ var/static/regex/italics = regex(@"\|(\S[\w\W]*?\S)\|", "g")
+ input = italics.Replace_char(input, "$1")
+ var/static/regex/bold = regex(@"\+(\S[\w\W]*?\S)\+", "g")
+ input = bold.Replace_char(input, "$1")
+ var/static/regex/underline = regex(@"_(\S[\w\W]*?\S)_", "g")
+ input = underline.Replace_char(input, "$1")
return input
/// Quirky citadel proc for our custom sayverbs to strip the verb out. Snowflakey as hell, say rewrite 3.0 when?