There are many syntax highlighting library around for HTML usage, such as highlight.js or SyntaxHighlighter. Now, here is another new comer, Highlights from Atom:
Here are three dark themes, Atom Dark, Solarized Dark, and Monokai; merged into one GIF animation:
There are a few more on its examples page, such as Atom Light and Solarized Light.
It’s written in CoffeeScript. Personally, I like highlight.js best, although this blog has been using Pygments to render the code block, not on-the-fly rendering using JavaScript on client-side anymore.
Highlights doesn’t provide a quick installation, I guess its intended users are a bit different. What I meant by quick is a HTML/JavaScript code that you could insert and it works just like that. Highlights doesn’t do like that:
Reads in code, writes out HTML with CSS classes based on the tokens in the code.
It seems to be more like a regular command other than a script for web. I don’t run Coffeescript, but it really does look like a nice script with good output and styles, so this post is.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.