=> Chuck Highlighter v0.9.1

built by Scott Hewitt www.ablelemon.co.uk/chuckhl

=> Is

A syntax highlighter for the musical programming language ChucK. More information about Chuck here. This was created for use in my Chuck a Day Project Aug – Sept 2009.

=> Use

  • Copy chuckhlib.php5 and chuckhighlightcss into working directory

  • Include chuckhlib.php5 in file

  • Then call function with file to be processed

  • Outputs file contents within <div><pre> tages

=> Demo

Online demo here.

=> Download

Download here.

Requires php5

=> Bugs

Does not handle numbers within strings ed. “arg1″ solution: manual add to $looktoignore array

=> Demo

Included in download

<?php<br /> //File must be included<br /> include('chuckhilib.php5');

//call lib function chuckhighlight and then file to highlight<br /> chuckhighlight("chuckcode/demo.ck");

//just draws a line<br /> echo "<hr>";

//works on second file<br /> chuckhighlight("chuckcode/8demo.ck");


=> How

Basic PHP string substitution done using str_replace, this attaches html span tags.

These are styled by the attached css file.

This means that you could swap out the css file for your own styling if you wish.

=> Change Log

Corrected code to handle multiline comments /* */