Trim surrounding newlines and spaces from content
This commit is contained in:
parent
558523df27
commit
19b8942ab6
@ -8,7 +8,8 @@ class CustomPrismjs extends Shortcode
|
||||
public function init()
|
||||
{
|
||||
$this->shortcode->getHandlers()->add('rootsh', function(ShortcodeInterface $sc) {
|
||||
return '<pre class="command-line language-sh" data-prompt="#" data-continuation-str="\" tabindex="0"><code class="language-sh">'.$sc->getContent().'</code></pre>';
|
||||
$content = rtrim(ltrim($sc->getContent()))
|
||||
return '<pre class="command-line language-sh" data-prompt="#" data-continuation-str="\" tabindex="0"><code class="language-sh">'.$content.'</code></pre>';
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
<?php
|
||||
include('CustomPrismjs.php');
|
||||
?>
|
Loading…
Reference in New Issue
Block a user