Remove tabs if followed by new lines (or vice versa)

pull/12917/head
Michael 2023-03-19 20:16:41 +00:00
rodzic d886a53af0
commit 12d2de2c93
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -1338,11 +1338,11 @@ class BBCode
// removing multiplicated newlines // removing multiplicated newlines
if (DI::config()->get('system', 'remove_multiplicated_lines')) { if (DI::config()->get('system', 'remove_multiplicated_lines')) {
$search = [ $search = [
"\n\n\n", "\n ", " \n", "[/quote]\n\n", "\n[/quote]", "[/li]\n", "\n[li]", "\n[*]", "\n[ul]", "[/ul]\n", "\n\n[share ", "[/attachment]\n", "\n\n\n", "\n ", " \n", "\n\t", "\t\n", "\n\r", "\r\n", "[/quote]\n\n", "\n[/quote]", "[/li]\n", "\n[li]", "\n[*]", "\n[ul]", "[/ul]\n", "\n\n[share ", "[/attachment]\n",
"\n[h1]", "[/h1]\n", "\n[h2]", "[/h2]\n", "\n[h3]", "[/h3]\n", "\n[h4]", "[/h4]\n", "\n[h5]", "[/h5]\n", "\n[h6]", "[/h6]\n" "\n[h1]", "[/h1]\n", "\n[h2]", "[/h2]\n", "\n[h3]", "[/h3]\n", "\n[h4]", "[/h4]\n", "\n[h5]", "[/h5]\n", "\n[h6]", "[/h6]\n"
]; ];
$replace = [ $replace = [
"\n\n", "\n", "\n", "[/quote]\n", "[/quote]", "[/li]", "[li]", "[*]", "[ul]", "[/ul]", "\n[share ", "[/attachment]", "\n\n", "\n", "\n", "\n", "\n", "\n", "\n", "[/quote]\n", "[/quote]", "[/li]", "[li]", "[*]", "[ul]", "[/ul]", "\n[share ", "[/attachment]",
"[h1]", "[/h1]", "[h2]", "[/h2]", "[h3]", "[/h3]", "[h4]", "[/h4]", "[h5]", "[/h5]", "[h6]", "[/h6]" "[h1]", "[/h1]", "[h2]", "[/h2]", "[h3]", "[/h3]", "[h4]", "[/h4]", "[h5]", "[/h5]", "[h6]", "[/h6]"
]; ];
do { do {