From 19b8942ab6c8d6201baef6dc8c5dd21ee3ef696d Mon Sep 17 00:00:00 2001 From: RealStickman Date: Fri, 2 Jun 2023 13:29:03 +0000 Subject: [PATCH] Trim surrounding newlines and spaces from content --- plugins/shortcode-custom/CustomPrismjs.php | 3 ++- plugins/shortcode-custom/CustomShortcodes.php | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 plugins/shortcode-custom/CustomShortcodes.php diff --git a/plugins/shortcode-custom/CustomPrismjs.php b/plugins/shortcode-custom/CustomPrismjs.php index 0dc562c..1295dea 100644 --- a/plugins/shortcode-custom/CustomPrismjs.php +++ b/plugins/shortcode-custom/CustomPrismjs.php @@ -8,7 +8,8 @@ class CustomPrismjs extends Shortcode public function init() { $this->shortcode->getHandlers()->add('rootsh', function(ShortcodeInterface $sc) { - return '
'.$sc->getContent().'
'; + $content = rtrim(ltrim($sc->getContent())) + return '
'.$content.'
'; }); } } diff --git a/plugins/shortcode-custom/CustomShortcodes.php b/plugins/shortcode-custom/CustomShortcodes.php deleted file mode 100644 index 46fc2a4..0000000 --- a/plugins/shortcode-custom/CustomShortcodes.php +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file