Syntax highlighting

Skeletonz got a new kick ass feature today and it's syntax highlighting (for around 46 languages)!

The code is from a new project called PyKleur - from the guys behind Pocoo.

And now, check this out:

JavaScript

function RND(tmpl, ns, scope) {
 scope = scope || window;
 var fn = function(w, g) {
   g = g.split("|");
   var cnt = ns[g[0]];
   for(var i=1; i < g.length; i++)
     cnt = scope[g[i]](cnt);
   if(cnt == 0 || cnt == -1)
     cnt += '';
   return cnt || w;
 };
 return tmpl.replace(/%\(([A-Za-z0-9_|.])\)/g, fn);
}

Python

def hasSpam(text):
  fp = open("%s/spam_words.txt" % os.path.dirname(__file__), "r")
  list = fp.readlines()
  list = map(lambda x: x.strip(), list)
  for w in list:
    if text.find(w) != -1:
      return True
  return False

C

#include <stdio.h>

main() {
  printf ("Hello World!\n");
}

LaTeX

\documentclass[a4paper,10pt]{article}
\usepackage{german}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{hyphenat}
\usepackage{url}
\usepackage{ifpdf}
\ifpdf \usepackage[pdftex,bookmarks]{hyperref} \fi
\bibliographystyle{gerplainurl}
\sloppy
\title{A small sample \dots}
\author{My, myself, and I}
\date{\today}

\begin{document}
\maketitle
\tableofcontents
...
\end{document}
Code · Skeletonz 14. Oct 2006
4 comments so far

WOOOHOOO! PyKleur ROCKZZZZ! PyCasso, PyGment and Pocoo do as well.

Yeah, indeed. Pykleur rocks.

Hi Amir, could you take a look to see why http://www.orangoo.com/spell/ stopped working?
This is the only way I found to contact you.

Stanley:
I think the bug is now fixed. Try to reload. Thanks for notifying me.

By the way, my email is amix _at_ amix.dk.

Post a comment
Commenting on this post has expired.
© 2000-2009 amix. Powered by Skeletonz.