fix: only trim newlines form start of code blocks

This commit is contained in:
Michael Große
2018-01-30 15:04:14 +01:00
parent 92a5ea435b
commit 24c6eb7d72

View File

@ -236,7 +236,7 @@ class renderer_plugin_prosemirror extends Doku_Renderer {
public function code($text, $lang = null, $file = null) { // FIXME add support for file and lang
$node = new Node('code_block');
$this->nodestack->addTop($node);
$this->cdata(trim($text));
$this->cdata(trim($text, "\n"));
$this->nodestack->drop('code_block');
}