summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/parser/xhtml.php3
-rw-r--r--inc/parserutils.php3
2 files changed, 3 insertions, 3 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 3c71bb54e..e8fb84494 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -387,8 +387,9 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
if ( is_null($language) ) {
$this->preformatted($text);
} else {
- //strip leading blank line
+ //strip leading and trailing blank line
$text = preg_replace('/^\s*?\n/','',$text);
+ $text = preg_replace('/\s*?\n$/','',$text);
$this->doc .= p_xhtml_cached_geshi($text, $language);
}
}
diff --git a/inc/parserutils.php b/inc/parserutils.php
index 1bebfc698..70d73a417 100644
--- a/inc/parserutils.php
+++ b/inc/parserutils.php
@@ -499,13 +499,12 @@ function p_get_first_heading($id){
* @author Christopher Smith <chris@jalakai.co.uk>
*/
function p_xhtml_cached_geshi($code, $language) {
-
$cache = getCacheName($language.$code,".code");
if (@file_exists($cache)) {
$highlighted_code = io_readFile($cache, false);
- touch($cache);
+ @touch($cache);
} else {