From 71273d9477b88cca86e6724491c1ea337ee96f05 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 13 Jun 2012 21:27:14 +0200 Subject: switch to pygments - faster than geshi - easier to modify the css because there is only one - geshi upstream seems pretty dead Signed-off-by: Florian Pritz --- application/controllers/file.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'application/controllers/file.php') diff --git a/application/controllers/file.php b/application/controllers/file.php index ee983a639..3b9a8f9b4 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -167,9 +167,7 @@ class File extends CI_Controller { // generate line numbers (links) passthru('perl -ne \'print "$.\n"\' '.escapeshellarg($file)); echo ''."\n"; - $this->load->library('geshi'); - $this->geshi->initialize(array('set_language' => $mode, 'set_source' => file_get_contents($file), 'enable_classes' => 'true')); - echo $this->geshi->parse_code(); + passthru('pygmentize -F codetagify -O encoding=utf-8 -l '.escapeshellarg($mode).' -f html '.escapeshellarg($file)); } $cached = ob_get_contents(); ob_end_clean(); -- cgit v1.2.3-24-g4f1b