tags:

views:

143

answers:

1

I'm 98% sure that Google has an API for detecting the language of CODE blocks, much like this, but for code. I found it before, but I can't seem to find it again. Surprisingly difficult to find. Anyone have a link?

+1  A: 

Prettify?

Google Code Search uses meta data to 'make sure' (see http://www.google.com/help/codesearch_packagemap.html) but I don't know what they use to autodetect.

John Sheehan
How do you know Google code search doesn't detect the language? From that page, "Our software locates source code files within those archives, and *detects the language* and license". Although I don't know if that's just based on file extension. How does prettify guess the language?
Mark
You're right. I assumed from the FAQ that the package files were what it used, but it only uses those to 'make sure' http://www.google.com/help/faq_codesearch.html#packagemap
John Sheehan