]> Agilo's Weblog
Define 'irony'.  Bunch of idiots dancing on a plane to a song made famous by a band that died, in a plane crash.Steve Buscemi
(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:

/style.php?file=style.css
Showing the source of the stylesheet used by this weblog (/style.css).
/style.phps
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).

Agilo

PermaLink  |  Edit