mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
utf8_normalize_spaces 함수에서 불필요한 공백 문자 추가 제거
This commit is contained in:
parent
3f553d4d9c
commit
2276110b0f
1 changed files with 1 additions and 1 deletions
|
|
@ -680,7 +680,7 @@ function utf8_mbencode($str): string
|
|||
*/
|
||||
function utf8_normalize_spaces($str, bool $multiline = false): string
|
||||
{
|
||||
return $multiline ? preg_replace('/((?!\x0A)[\pZ\pC])+/u', ' ', (string)$str) : preg_replace('/[\pZ\pC]+/u', ' ', (string)$str);
|
||||
return $multiline ? preg_replace(['/((?!\x0A)[\pZ\pC])+/u', '/\x20(?=\x0A)/u'], [' ', ''], (string)$str) : preg_replace('/[\pZ\pC]+/u', ' ', (string)$str);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue