summaryrefslogtreecommitdiff
path: root/inc/parser
diff options
context:
space:
mode:
Diffstat (limited to 'inc/parser')
-rw-r--r--inc/parser/xhtml.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index c8862eece..c5a8b8218 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -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 {