From 313da78abbcffe408af09b97c101d52be18a262b Mon Sep 17 00:00:00 2001 From: andi Date: Thu, 28 Apr 2005 20:10:31 +0200 Subject: small fix for GeSHi call darcs-hash:20050428181031-9977f-0f76bba3670d6da2ef15408dd11de4ce4210dc94.gz --- inc/parser/xhtml.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'inc/parser') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index c8ea9323c..1e520852e 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -313,9 +313,12 @@ class Doku_Renderer_xhtml extends Doku_Renderer { if ( is_null($language) ) { $this->preformatted($text); } else { - // Handle with Geshi here FIXME: strip first beginning newline + //strip leading blank line + $text = preg_replace('/^\s*?\n/','',$text); + // Handle with Geshi here require_once(DOKU_INC . 'inc/geshi.php'); $geshi = new GeSHi($text, strtolower($language), DOKU_INC . 'inc/geshi'); + $geshi->set_encoding('utf-8'); $geshi->enable_classes(); $geshi->set_header_type(GESHI_HEADER_PRE); $geshi->set_overall_class('code'); -- cgit v1.2.3