Bugs + Suggestion: JavaScript Formatter Settings

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.

  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;

Bugs + Suggestion: JavaScript Formatter Settings

Postby pmk65 » Wed Jun 27, 2018 11:29 am

The indentation settings "JavaScript Formatter Settings" should be identical to the indentation settings in Preferences -> Text Settings -> General. Currently you risk ending up with an indentation that doesn't match the editor settings if you forgot to set the "JavaScript Formatter settings" identically.

I really don't see any reason for setting the indentation differently than the Editor settings. So maybe the indentation settings should be removed from "JavaScript Formatter Settings" and instead use the Editor indentation settings?
Image

Bug 1: Also if I click the "Indent Size" arrows rapidly in "JavaScript Formatter Settings", I get an error alert (Probably because the preview is still rendering).
Image

Bug 2: The Break before/after brackets settings seems to be ignored.

Example. I have a simple code snippet that looks like this:

Code: Select all
var waitTimerID = setInterval(function() {
    // code here
});


Then I run the JavaScript formatter with NONE of the "Break" checkboxes checked, and ends up with this:

Code: Select all
var waitTimerID = setInterval(function()
    {
        // code here
    }
);


Which is clearly wrong, as I DIDN'T want it to break before/after the brackets.
And if I check all the "Break" checkboxes, I end up with the exact same result.
There are 10 types of people in the world: Those who understand binary and those who don't.
User avatar
pmk65
 
Posts: 551
Joined: Sun Dec 20, 2009 9:58 pm
Location: Copenhagen, Denmark

Re: Bugs + Suggestion: JavaScript Formatter Settings

Postby Aivars » Wed Jun 27, 2018 1:42 pm

Thank you for the suggestions. I think your point about indentation settings is fair, and the chosen solution should probably apply to all other formatters as well, so we will consider this suggestion for the next major version.
I also added the bugs to the list.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2254
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia


Return to HTMLPad / Rapid CSS / Rapid PHP / WeBuilder Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest