diff options
author | andi <andi@splitbrain.org> | 2005-04-28 20:10:31 +0200 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-04-28 20:10:31 +0200 |
commit | 313da78abbcffe408af09b97c101d52be18a262b (patch) | |
tree | ed1dbe3d7ae954cf4e80855c75a7e6c23dd34fed /inc | |
parent | ab54ef437a39d90089975ba8cadd135bcc655690 (diff) | |
download | rpg-313da78abbcffe408af09b97c101d52be18a262b.tar.gz rpg-313da78abbcffe408af09b97c101d52be18a262b.tar.bz2 |
small fix for GeSHi call
darcs-hash:20050428181031-9977f-0f76bba3670d6da2ef15408dd11de4ce4210dc94.gz
Diffstat (limited to 'inc')
-rw-r--r-- | inc/parser/xhtml.php | 5 |
1 files changed, 4 insertions, 1 deletions
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'); |