facelessuser/ApplySyntax — pull request #23 by AdrianLC (2013-08-13 19:08:59+00:00)
Title: jQuery syntax detection

Hello,

[This](https://github.com/mrmartineau/jQuery) provides jQuery snippets and some syntax highlighting for jQuery selectors,
and I have set the syntax manually to use it, so I wrote this.

I couldn't think of any alternative so it looks for substrings in the code.
I though about checking up the file structure as in your rails implementation, but I don't think that would work with javascript. You know, standalone scripts, AMD, too many posibilities...

It works fine with my projects, but I'm afraid it could give false positives. I've found that there are other libraries that replicate jQuery's API and though the syntax could be useful for most of them anyway, some snippets wouldn't.

Anyway, please have a look at the code whenever you can. I bet you're familiar with jQuery so your thoughts on the substring list would be nice :D

Many thanks,
Adrián

_PS: I had my editor set to write spaces instead of tabs. If needed, I can change that in a second. No problem._