Hi, code
What I’m trying to do is using some php code named "geshi.php" to highlight some source code.
What I pasted before is the code of a snippet named "Geshi". As you can see, the code itself call geshi.php who does the real syntax highlighting job.
There was some error in my snippet call (I had forgotten the "?" after the snippet name.)
Currently, I’m trying to parse some code in the xbasic/xblite language.
There is available syntax definition file for qbasic and I choose to use it.
The file is inserted but not highlighted yet.
I’m wondering if this can be due to Geshi using the paranoid mode.
Or should I encode the file ?
Thanks for any help.
The snippet call :
[!Geshi? &src=`codes/thefile.x` &lang=`qbasic` !]
And the snippet calling the syntax highlighter :
<?php
if (!isset($src)) {echo "Le code source n'a pas pu être chargé.";}
if (!isset($lang)) {$lang='qbasic';}
include_once('assets/snippets/geshi/geshi.php');
$fichier = "include_once('".$src."');";
geshi_highlight(eval($fichier), $lang, $path);
?>
N.B. The qbasic.php syntax definitions file is in subfolder "geshi" relatively to the location of the geshi.php file.