remove newline
This commit is contained in:
parent
5d1cc8584f
commit
a551943b49
@ -8,7 +8,7 @@ class Prismjsshroot extends Shortcode
|
||||
public function init()
|
||||
{
|
||||
$this->shortcode->getRawHandlers()->add('shroot', function(ShortcodeInterface $sc) {
|
||||
$content = preg_replace('/^```.*$/m', '', $content);
|
||||
$content = preg_replace('/^```.*(\n)?$/m', '', $content);
|
||||
$content = trim($sc->getContent(), "\n ");
|
||||
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