Showing posts with label SyntaxHighlighter. Show all posts
Showing posts with label SyntaxHighlighter. Show all posts

Sunday, November 10, 2013

SyntaxHighlighter Highlighting in new Blogger Templates

I've been having issues with SyntaxHighlighter with my new Blogger theme, so I'm using this post to get the bugs worked out.

SELECT *
FROM users
WHERE user_hasClue = true;


I was having issues with posting XML code, but I think I've resolved them.
Here's an example of my XML problems. The image below and the code above it should be the same:

 
  
  
  
  
  
  
  
  
  
  
 
 
  
  
  
  
  
  
  
  
  
  
 
 
  
  
  
  
  
  
  
 


For a period of time, the XML code snippets looked like this:


The two StackOverflow questions that have been helpful in researching this topic are here:

http://stackoverflow.com/questions/12464924/blogger-syntaxhighlighter-doesnt-work-at-all 

http://stackoverflow.com/questions/6849890/syntax-highlighter-3-0-not-working-on-blogspot/15328620#15328620

Here is the stuff I added to the "head" of my template HTML (feel free to use it if it's helpful):


Tuesday, November 13, 2012

Layout refresh!

So, apparently my blog layout decided to die a horrible flaming death today, so I've updated the layout.

It looks like I've been able to restore the SyntaxHighlighter functionality, too. I gave the SyntaxHighlighter theme an update, because the white background didn't seem to fit in very well.

If you're interested about how to add SyntaxHighlighter to a Blogger Blog with minimal fuss, check out this tutorial from MyBloggerLab. Their customizable code widget is pretty nifty. Let me know if you run into any formatting issues.

Thanks for reading!

Sunday, August 15, 2010

New Syntax Highlighting implemented on the blog!

I've just implemented some new Syntax Highlighting, courtesy of Alex Gorbachev's SyntaxHighlighter. Here is an example of the new highlighted code.

Java:
public class AppleMain {

 public static void main(String[] args) {
  
  Tuna oTuna = new Tuna();
  oTuna.simpleMessage();
  oTuna.baconAndCheese();
  
  Apples oApples = new Apples();
  oApples.simpleMessage();
  oApples.cheeseBurger();
  
  oTuna.baconCheezBurger();

 }

}


For other Blogger users, this post from MLA Wire is very helpful in integrating the new Syntax Highlighting to Blogger.

I'll see if I can update some of the code in my older posts to integrate this feature.