I found a Google Code utility that I had tried to get added without much success but today, my colleague Ron got it working for us to use in our new forum (coming soon!). Now, with a couple of additions to my Blogger template, I'm able to use a slightly modified pre tag to get my code blocks formatted quite nicely.
All I have to do is enclose my code like this:
and I'm all set. To get this example to show up, I had to use "& lt" instead of the actual pre start and end tags (using <). That's good to know as it allows you to also display html as formatted code text and not be interpretted.
<pre name="code" class="sql">
</pre>
Cool stuff. The piece that I needed to get all this working was related to javascript, so when Ron got that part handled, I was in business!
Check it out if you're looking for a way to format your code in a nice, clean way.
No comments:
Post a Comment