I have this bit of JavaScript...
15 $(\'.ajax_edit_address\').each(function() {
16 $(this).ajaxForm({
17 target: $(this).parents(\'table.addre
The biggest issue seems to be the cindent doesn't recognize this type of syntax:
test({
var b = 2;
});
It will turn it into this:
test({
var b = 2;
});
If you handle that case I'd imagine the indent wouldn't be so awful for the jQuery syntax. But this would require you writing a custom javascript indent file. Also, you'd have to edit the html indent file to not use cindent for script tags with javascript content.
I don't think anyone has successfully created a jquery/prototype compatible indent file for javascript. The existing javascript indent scripts are all flawed.