Random Stuff About Stuff

The Highlighter Fight Continues

January 05, 2015

So I’ve tried a the whole highlight code thing and had it working for a time.  But I noticed it has stopped working again.

So I’ll try again with a different approach this time, fighting Google’s dynamic views and Blogger’s views in general was probably a bad idea, they are always going to be changing I guess.

Anyone know why Google seems to be so deadset against having highlighted code in your blog? Or what would be the best blog for coding? Perhaps with built in support for code highlighting and code in general.

Github’s gist’s seemed like a good option but they seem to suffer from the same problem.
http://nullbloggerexception.blogspot.ie/2012/10/use-gist-to-embed-code-in-blogger.html

The code example has disappeared (turns out only in Chrome), I’ve also seen a few others where all that’s displayed is ‘Loading’ (need to see if they are just Chrome as well)

So a service like
http://hilite.me/

Seems to be the answer, the whole thing is included in the blog post so hopefully Google won’t mess with it

For example

1  
2  
3  
4  
5  
6  
7  
8
/**  
 * @author David Kerwick  
 * Created on 07 Feb 2014  
 */  

public interface HelloWorld {  
   void sayHello();  
}  

Written by David Kerwick who lives and works Dublin as a Java Technical Lead.