CodeHTMLer allows you to convert plain  source code text files to HTML version of it:

http://puzzleware.net/codehtmler/ 

and it's source code it's free !!