It's a work in progress, and I won't post the code yet, but it seems to be working. It's based around the code from BlogCFC which looks to be originally written by Dain Anderson.
It had a few bits that I didn't understand, and some formatting that I didn't want. So I have severly hacked it for my own purposes. Here's what I did:
- Change it from being script to tag based
(refuse to use script until 100% support) - Made use my favourite var local = {} to ensure all variables are scope.
- Added a colorCode from file method
- Added line numbering to the output
- Change the formatting and some of the colors to match DreamWeaver (might add an eclipse option also)
- And just a general tidy up of variables that were not being used etc.
Because of the way that it works, lots of regular expressions on <> combo's it won't color it's self properly, not sure I need to fix that.
If your interested in a simple example. NOTE: Link removed, this has been released, see the New Blog Entry.
As usual all comments and suggestions welcome and I will share the code once I finalise it.
3 comments:
I'd love a version once it's finished - now I have to code all my CF examples by hand using HTML and CSS ;-) Automation is the way to go!
Would it be possible to get that color code from you I would really like to use it.
This has now been released
New Blog Entry
Post a Comment