]> Agilo's Weblog
Oro?Rurouni Kenshin
(Add a new entry)  

Sunday, January 1 2006, 08:43PM

CSS highlighting script.

I wrote a CSS highlighting script today.

I initially started out with the thought of creating a script similar to PHP's highlight_file() function to show CSS files in similar syntax highlighting.
So I got myself started writing out a basic outline and started to work things out with regular expressions.
I got so deeply involved with my regular expressions that I eventually finished the project five hours later! :o

Anyway, here are the files:

Showing the source of the stylesheet used by this weblog (/style.css).
The source of /style.php.

If anyone decides to use this; be sure to thoroughly read the comments inside! :)
One important notice, though: It does not support one-liners, the CSS file must have reasonable syntax (read the comments for a sample).


PermaLink  |  Edit