Skip to content
Snippets Groups Projects
Commit d43aac1c authored by Gina Haeussge's avatar Gina Haeussge
Browse files

FS#1915: strip one leading and one trailing newline from code content if available

parent 9fa341d0
No related branches found
No related tags found
No related merge requests found
......@@ -442,6 +442,13 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$this->doc .= '</a></dt>'.DOKU_LF.'<dd>';
}
if ($text{0} == "\n") {
$text = substr($text, 1);
}
if (substr($text, -1) == "\n") {
$text = substr($text, 0, -1);
}
if ( is_null($language) ) {
$this->doc .= '<pre class="'.$type.'">'.$this->_xmlEntities($text).'</pre>'.DOKU_LF;
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment