From 5b97b6a41d0d9a391f798a2676d32b0895489f4f Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 26 Jan 2024 21:30:30 +0200 Subject: [PATCH] add underline escape --- src/controller/room.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/controller/room.php b/src/controller/room.php index 4e3aa6a..09c7ff6 100644 --- a/src/controller/room.php +++ b/src/controller/room.php @@ -595,10 +595,16 @@ class Room $line ); - // Escape inline * + // Escape inline $line = preg_replace( - '/[*]{1}([^*]+)[*]{1}/', - '[*]$1[*]', + [ + '/[*]{1}([^*]+)[*]{1}/', + '/[_]{1}([^*]+)[_]{1}/', + ], + [ + '[*]$1[*]', + '[_]$1[_]', + ], $line );