Fix oopsie doodle
This commit is contained in:
parent
475fc8abd9
commit
d2a7113cae
@ -8,8 +8,8 @@ class Prismjsshroot extends Shortcode
|
|||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$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', '', $sc->getContent());
|
||||||
$content = trim($sc->getContent());
|
$content = trim($content);
|
||||||
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