Syntax Highlighting with Blogger Engine
I was trying to style the code snippets highlighted as code as developer in my blog. Did it using some custom css but no positive impression. Recently googling, found an article abt that here.
This can be done using syntaxhiglighter.
Drop this code right before your </head> tag...
and save.
And here is the way how you can use it.
1. Using <script> tag with CDATA
2. Using the <pre> tag.
This can be done using syntaxhiglighter.
Drop this code right before your </head> tag...
and save.
And here is the way how you can use it.
1. Using <script> tag with CDATA
This will output....
// Commenting this function function custom_one($var) { if($one == $two) { $three = array( 'one', 'two' ); } }
2. Using the <pre> tag.
This will output....// Commenting this function function custom_one($var) { if($one == $two) { $three = array( 'one', 'two' ); } }
// Commenting this function function custom_one($var) { if($one == $two) { $three = array( 'one', 'two' ); } }
Doesn't work
ReplyDeleteThis is what exactly working here right now. Will you double check your settings?
ReplyDelete