From 49509e73473de6f3528c7fdba8a4fa5437829817 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 21 Mar 2024 09:47:34 +0000 Subject: more whitespace fixes and some docu --- include/bbcode.php | 14 ++++++++------ view/theme/redbasic/css/sample.scss | 4 ++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index 360ebadc8..d4aeb369f 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1440,32 +1440,32 @@ function bbcode($text, $options = []) { // Check for h1 if (strpos($text,'[h1]') !== false) { $text = preg_replace("(\[h1\](.*?)\[\/h1\])ism",'

$1

',$text); - $text = str_replace(["\n\n", "\n"], '', $text); + $text = str_replace(["\r", "\n"], '', $text); } // Check for h2 if (strpos($text,'[h2]') !== false) { $text = preg_replace("(\[h2\](.*?)\[\/h2\])ism",'

$1

',$text); - $text = str_replace(["\n\n", "\n"], '', $text); + $text = str_replace(["\r", "\n"], '', $text); } // Check for h3 if (strpos($text,'[h3]') !== false) { $text = preg_replace("(\[h3\](.*?)\[\/h3\])ism",'

$1

',$text); - $text = str_replace(["\n\n", "\n"], '', $text); + $text = str_replace(["\r", "\n"], '', $text); } // Check for h4 if (strpos($text,'[h4]') !== false) { $text = preg_replace("(\[h4\](.*?)\[\/h4\])ism",'

$1

',$text); - $text = str_replace(["\n\n", "\n"], '', $text); + $text = str_replace(["\r", "\n"], '', $text); } // Check for h5 if (strpos($text,'[h5]') !== false) { $text = preg_replace("(\[h5\](.*?)\[\/h5\])ism",'
$1
',$text); - $text = str_replace(["\n\n", "\n"], '', $text); + $text = str_replace(["\r", "\n"], '', $text); } // Check for h6 if (strpos($text,'[h6]') !== false) { $text = preg_replace("(\[h6\](.*?)\[\/h6\])ism",'
$1
',$text); - $text = str_replace(["\n\n", "\n"], '', $text); + $text = str_replace(["\r", "\n"], '', $text); } // Check for table of content without params @@ -1507,6 +1507,8 @@ function bbcode($text, $options = []) { ((strpos($text, "[/dl]") !== false) && (strpos($text, "[dl") !== false)) || ((strpos($text, "[/li]") !== false) && (strpos($text, "[li]") !== false))) && (++$endlessloop < 20)) { + $text = str_replace(["[/list]\r", "[/list]\n"], '[/list]', $text); + $text = preg_replace_callback("/\[list\](.*?)\[\/list\]/ism",'bb_fix_lf', $text); $text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '', $text); diff --git a/view/theme/redbasic/css/sample.scss b/view/theme/redbasic/css/sample.scss index 87005be90..410026aa2 100644 --- a/view/theme/redbasic/css/sample.scss +++ b/view/theme/redbasic/css/sample.scss @@ -1,3 +1,7 @@ +// To compiled custom site bootstrap from sass, +// run this script from the document root for an example: +// php vendor/bin/pscss view/theme/redbasic/css/sample.scss view/theme/redbasic/css/bootstrap-custom.css + // See https://getbootstrap.com/docs/5.3/customize/sass/ for more infos // required import -- cgit v1.2.3