cvs: pres2 / objects.php

From: Date: Wed, 25 Jan 2006 02:26:51 +0000
Subject: cvs: pres2 / objects.php
Groups: php.pres 
Request: Send a blank email to pres+get-1238@lists.php.net to get a copy of this message
rasmus Wed Jan 25 02:26:51 2006 UTC Modified files: /pres2 objects.php Log: Let's highlight javascript as well and treat .inc as PHP http://cvs.php.net/viewcvs.cgi/pres2/objects.php?r1=1.156&r2=1.157&diff_format=u Index: pres2/objects.php diff -u pres2/objects.php:1.156 pres2/objects.php:1.157 --- pres2/objects.php:1.156 Mon Sep 13 13:36:38 2004 +++ pres2/objects.php Wed Jan 25 02:26:51 2006 @@ -252,10 +252,12 @@ 'py' => 'python', 'pl' => 'perl', 'php' => 'php', + 'inc' => 'php', 'html' => 'html', 'sql' => 'sql', 'java' => 'java', 'xml' => 'xml', + 'js' => 'javascript', 'c' => 'c' ); @@ -316,6 +318,14 @@ $this->_highlight_none($_html_filename); } break; + case 'javascript': + $prog = trim(which code2html); + if (!empty($prog)) { + print nl2br(trim($prog -ljavascript -ohtml-light --no-header $_html_filename | sed -e 's/ /\&nbsp\;\  /g')); + } else { + $this->_highlight_none($_html_filename); + } + break; case 'sql': $prog = trim(which code2html); if (!empty($prog)) {

« previous php.pres (#1238) next »