Trim all standard stuff
This commit is contained in:
parent
a551943b49
commit
0da7958cae
@ -9,7 +9,7 @@ class Prismjsshroot extends Shortcode
|
|||||||
{
|
{
|
||||||
$this->shortcode->getRawHandlers()->add('shroot', function(ShortcodeInterface $sc) {
|
$this->shortcode->getRawHandlers()->add('shroot', function(ShortcodeInterface $sc) {
|
||||||
$content = preg_replace('/^```.*(\n)?$/m', '', $content);
|
$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>';
|
return '<pre class="command-line language-sh" data-prompt="#" data-continuation-str="\" tabindex="0"><code class="language-sh">'.$content.'</code></pre>';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user