Blogger Woes!

Recently I posted about syntax highlighting in blogger (see link). Everything ran smoothly up until the point that I changed blog themes, and then all hell broke loose. My highlighting broke and any code snippets appeared as ugly small text boxes before I noticed just a few days ago....it's a little embarrassing to post your knowledge of something only to find out that your examples are broken.

Anyhow, since I've made a number of updated to the blog lately I figured that I'd messed something up. I find the code for blogger a little bit dirty with all sorts of widget and includable tags making up the page - I had a fun time debugging my code in an attempt to find the issue. The error console in firefox pointed to the fact that a variable dp (see previous post) was undefined.

On closer inspection, it appeared that my whole javascript section with the syntax highlighting functions was compressed into a single line and this appeared to be the root of the issue. Try as i might, i couldn't find anywhere where i had gone wrong....leading to the discovery that i did not do anything wrong - this is a blogger issue!


A solution was suggested in the blogger forums and I'll share it here as it directly relates to the previous code snippet I provided:

After some further investigation, I've found a solution (if not
necessarily *the* solution). Instead of this...






...code this...





Note that I'm using an XHTML 1.0 Transitional doctype in my template.
I didn't test with HTML 4.0, and I don't know whether or not the CDATA
will parse using that doctype.

Apparently the issue began sometime in January (see blogger forum posts here ) and was pretty widespread. Thanks to MikeS for the suggestion. Syntax highlighting is now back up and running! Frankly, I'd like to know what caused this issue to begin with but that, i fear, will remain a mystery!
Post a Comment

Popular posts from this blog

Getting Started with Mirth (Part 2)

Mirth

Visual Studio 2012–Debug in Chrome Incognito Mode