Trim all standard stuff

This commit is contained in:
RealStickman 2023-06-02 17:44:40 +02:00
parent a551943b49
commit 0da7958cae

View File

@ -9,7 +9,7 @@ class Prismjsshroot extends Shortcode
{
$this->shortcode->getRawHandlers()->add('shroot', function(ShortcodeInterface $sc) {
$content = preg_replace('/^```.*(\n)?$/m', '', $content);
$content = trim($sc->getContent(), "\n ");
$content = trim($sc->getContent());
return '<pre class="command-line language-sh" data-prompt="#" data-continuation-str="\" tabindex="0"><code class="language-sh">'.$content.'</code></pre>';
});
}