Syntax Highlighting for Devoracles.com
September 6, 2008
Filed under
Bulk
A new gadget has been included in the Devoracles.com back-end software to ease your navigation and your reading.
If you navigate on pages which has some sample codes included, from now on the code snippets’ will be highlighted.
Here is how it looks like:
function somename($hulla){
if (this.location == null){
try.this;
}else if (this.location != null){
dont.try.this;
}else{
getElementById("code_highlighting_rocks").innerHTML = 'Really rocks';
luv.it;
}
}
Of course, the above code is only some dummy code, but it’s Javascript, theoretically highlighted just as Dreamweaver would do it.
The code which enables our engine to do the above is pure Javascript, there is no way it can interfere with the webserver and is not dependent of it in any way.
The code was written by Alex Gorbatchev and published on code.google.com.
Initially I wanted to use Google-Code-Prettify, but it seems it was in conflict with some other Javascript which powers Devoracles, and I couldn’t get rid of conflict.
So, Mr. Gorbatchev, hats off, your code rocks.
Possible related posts (automatic):
Related posts brought to you by Yet Another Related Posts Plugin.



















Comments
Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!
If you want to use your OpenID, fill out the field labeled "Website" with the OpenID URL. The other fields may remain empty.