This is a migrated thread and some comments may be shown as answers.

jQuery auto-formatting

1 Answer 38 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 10 Apr 2011, 10:06 PM
I THINK I posted about this a while ago...and I cant remember the fix (if there was one)

JustCode absolutely borks jQuery in an external javascript file

This is a sample form the jquery site

$('#clickme').click(function() {
  $('#book').animate({
    opacity: 0.25,
    left: '+=50',
    height: 'toggle'
  }, 5000, function() {
    // Animation complete.
  });
});

So each new line is tabbed in 1 place

This is what JustCode is doing to me on semi-colon
$('#clickme').click(function ()
    {
        $('#book').animate({
                opacity: 0.25,
                left: '+=50',
                height: 'toggle'
            }, 5000, function ()
            {
                // Animation complete.
            });
    });

It's becoming incresingly frustrating having to go back and REformat it, then god forbid I need to edit it (borks itself again)

Please fix...everyone uses jQuery...and I'd rather not turn off JustCode for javascript (if thats even possible)

1 Answer, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 14 Apr 2011, 09:05 AM
Hi Steve,

Sorry for the inconvenience. We've planned, and are currently working on, a major rework of the javascript formatter for the next Q. It includes lots of new options for formatting and internal restructuring of the formatting functionality, so that you won't get such frustrating behavior anymore. For the time being you might try switching off the "Format on semicolon" option in the General page of the JustCode Options dialog, and see if that works out for you. Thanks for sharing.

All the best,
Kaloyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
Kaloyan
Telerik team
Share this question
or