Developer Blog Search

Thursday 15 May 2008

What do you think of my code formatter?

you can see it in action in my last post, at the moment it doesn't work properly in IE, the regex engine seems to be doing something differently!

It's really simple to use unlike some, where you feed it your code and it'll do everything and return you a big block of html. It is all dynamic and the code looks like this:

<pre class="codeblock sh_csharp" title="title of code">
using mycode.code;

public class myclass {

}
</pre>

it highlights (using SHJS, so basically any language you can think of can be highlighted) and makes it look pretty, lets you show/hide it, show/hide line numbers and copy the code to the clipboard.

are there any other features anybody would like to see?

I'm going to release the code under the GNU GPL. Once it's finished and works in IE properly!

IE local won't run show my page so I can't test it. I've been uploading and testing on here, so forgive me as syntax highlighting only currently works on the first code block at the moment and my lunch break is over! :)

No comments: