Friday, October 10, 2014

I Miss WordPress - Syntax Highlighter + Blogger = Haywire!


Haha, ironik tak.

Memang pun. Especially after spending countless of hours tweaking here (read: Blogspot or Blogger, whatever heh ;) ).

Oh! Crap.

Aku perasan malam tadi yang Syntax Highlighter script dan Blogger sometime haywire, resulting mess up codes.

Don't get me wrong. The script works flawlessly without the <pre and syntax highlighter stuff.

The problem occurs when I wrapped Javascript codes with <pre tag and press Save/Update/Publish button. For no reason, Blogger's engine change the wrapped code into something else.

So, I need to double or triple check the shared Javascript codes to ensure it will work. Not only for my readers but for my own purpose as well.

My own purpose?

Yeah!

You see, I am an relatively old guy and sometime I tend to forgot stuff that I learned many eons ago.

So, by sharing the knowledge here, I know I can rely on Google and definitely know where can I retrieve the lost stuff in the future. And yes of course, those who happen to found this blog could benefit from the treasures as well.

Quick & Dirty Solution

Maybe, I will not use syntax highlighter anymore. Perhaps, I just copy paste the script in composer mode and store the raw script in text file and upload it in my Google drive. And of course, I will create a link from this blog to the file hosted in Google drive as well. No worries.

It is not final but I am seriously considering it.

But I will not use WordPress for this kind of blog; the blog that I just can dump all my knowledge and opinion without the need to restrict myself much for whatever reason. I love this kind of freedom here. So, no worries Blogger, our marriage is intact :D

I Wish

Well, I wish I could find a better syntax highlighter. Or, perhaps code my own one using JavaScript and CSS.

But I am not very fond of the 'Inventing The Wheel' idea. The solution must be out there already. Blogger is not young. JavaScript is even older. Heck, many pros out there are still prefer Blogger over everything else.

Must find a real open source Syntax Highlighter which uses CSS, HTML and JavaScript only. Can't modify current one much since it is heavily encrypted.

But as off now, we might stick with the Quick and Dirty Solution :)

0 comments:

Post a Comment