From 98c6dfea845f28ddb0e4a50f6a8d02a81fb06752 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Fri, 2 Jun 2023 13:33:33 +0000 Subject: [PATCH] use trim --- plugins/shortcode-custom/CustomPrismjs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/shortcode-custom/CustomPrismjs.php b/plugins/shortcode-custom/CustomPrismjs.php index 44f5cc9..18a914f 100644 --- a/plugins/shortcode-custom/CustomPrismjs.php +++ b/plugins/shortcode-custom/CustomPrismjs.php @@ -8,7 +8,7 @@ class CustomPrismjs extends Shortcode public function init() { $this->shortcode->getHandlers()->add('rootsh', function(ShortcodeInterface $sc) { - $content = rtrim(ltrim($sc->getContent())); + $content = trim($sc->getContent(), "\n "); return '
'.$content.'
'; }); }