From 5d1cc8584fa63acc48b63daf8a38bef94845a2ec Mon Sep 17 00:00:00 2001 From: RealStickman Date: Fri, 2 Jun 2023 17:39:45 +0200 Subject: [PATCH] Swap order of removing code blocks and trimming --- plugins/shortcode-custom/Prismjsshroot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/shortcode-custom/Prismjsshroot.php b/plugins/shortcode-custom/Prismjsshroot.php index 9589855..3eda12a 100644 --- a/plugins/shortcode-custom/Prismjsshroot.php +++ b/plugins/shortcode-custom/Prismjsshroot.php @@ -8,8 +8,8 @@ class Prismjsshroot extends Shortcode public function init() { $this->shortcode->getRawHandlers()->add('shroot', function(ShortcodeInterface $sc) { - $content = trim($sc->getContent(), "\n "); $content = preg_replace('/^```.*$/m', '', $content); + $content = trim($sc->getContent(), "\n "); return '
'.$content.'
'; }); }