From 2faf0d3fd18d9374f6491fed58a8acfec553aa26 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Tue, 22 Dec 2020 13:42:03 -0700 Subject: [PATCH] ok --- code/game/say.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/say.dm b/code/game/say.dm index 61dd9c0879..3bc14ed245 100644 --- a/code/game/say.dm +++ b/code/game/say.dm @@ -98,11 +98,11 @@ GLOBAL_LIST_INIT(freqtospan, list( /// Converts specific characters, like +, |, and _ to formatted output. /atom/movable/proc/say_emphasis(input) - var/static/regex/italics = regex(@"\|(\S[\w\W]*?\S)\|", "g") + 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") + 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") + var/static/regex/underline = regex(@"_((?=\S)[\w\W]*?(?<=\S))_", "g") input = underline.Replace_char(input, "$1") return input