Page 1 of 1

Control+I in IDE messes up alignment of semicolons in inline Javascript

Posted: Wed Dec 27, 2023 1:18 pm
by Quin
If I have semicolons at the end of a bunch of javascript lines, like this, selecting all the code and pressing control+I aligns the semicolons like so:

Code: Select all

    EnableJS
    synth = window.speechSynthesis;
    aria = document.createElement("div");
    aria.id = "speech"                  ;
    aria.style = "position: absolute; left: 0px; top: -400px";
    aria.setAttribute("aria-live", "assertive")              ;
    document.body.appendChild(aria)                          ;
    DisableJS
Is this intended? I think not; probably a side effect of comments being a semicolon.

Re: Control+I in IDE messes up alignment of semicolons in inline Javascript

Posted: Wed Dec 27, 2023 1:22 pm
by Quin
I just tested, and this seems limited to EnableJS/DisableJS blocks; using the ! before every line doesn't do it.

Re: Control+I in IDE messes up alignment of semicolons in inline Javascript

Posted: Fri May 31, 2024 12:00 pm
by Fred
IN JS block, you should only use '!' lines when writing javascript code. HTML tags can be put without the '!'. I added a note in the documentation.

Re: [Done] Control+I in IDE messes up alignment of semicolons in inline Javascript

Posted: Fri May 31, 2024 2:00 pm
by Quin
Oh, interesting. I see. Thanks Fred!