• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Format code button breaking code

Community Beginner ,
Aug 02, 2017 Aug 02, 2017

Copy link to clipboard

Copied

I have an issue that I've come upon twice now and curious if anyone has a better workaround than what I do.

I use the format code button constantly to make sure i haven't broken something recently however certain lines of code it literally breaks... I think its using < or > in a use such as below::

var args: Vector.<String> = new Vector.<String>();

becomes (note spaces)

var args: Vector. < String > = new Vector. < String > ();

What I have been doing is just adding //the code again so i can quickly copy paste back what it should be....

so i would have this:

var args: Vector.<String> = new Vector.<String>();//var args: Vector.<String> = new Vector.<String>();

after hitting format code button this:

var args: Vector. < String > = new Vector. < String > ();//var args: Vector.<String> = new Vector.<String>();

then i would copy the commented text from the right to the left.   Saves me a few keystrokes per line.

I'm sure somebody has a better solution for me .... I don't see a preference that would fix this.... (already tried turning off "add space after keywords")

Views

268

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Aug 02, 2017 Aug 02, 2017

Looks like the code formatter is mistaking the brackets around the variable type for mathematical operators. I blame AS3's ridiculous vector syntax. Anyway, since it results in invalid code, this is definitely a bug. Report it here:

Feature Request/Bug Report Form

Votes

Translate

Translate
LEGEND ,
Aug 02, 2017 Aug 02, 2017

Copy link to clipboard

Copied

Looks like the code formatter is mistaking the brackets around the variable type for mathematical operators. I blame AS3's ridiculous vector syntax. Anyway, since it results in invalid code, this is definitely a bug. Report it here:

Feature Request/Bug Report Form

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 02, 2017 Aug 02, 2017

Copy link to clipboard

Copied

I reported the auto format with vectors issue years ago, but no harm in it being reported outside of the prerelease.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 02, 2017 Aug 02, 2017

Copy link to clipboard

Copied

LATEST

reported. thank you for the link! knowing its a bug and I'm not crazy is better than nothing.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines