1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Accepted Code helper lines are misaligned.

Discussion in 'Suggestions and Feedback' started by Gamebuster, Feb 3, 2017.

  1. Gamebuster

    Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    26
    Likes Received:
    3
    Code (Text):
    1.  
    2.   public static String addCommas(String s){
    3.     String ret = "";
    4.     for(int i = s.length() - 1, j = 1; i > -1; i--, j++){//reverse iteration
    5.       ret = s.charAt(i) + ret;
    6.       if (j % 3 == 0){ //if evenly divisble by 3
    7.           ret = "," + ret;
    8.       }
    9.     }
    10.     return ret;
    11. }
    12.  
    You can see that the above text does not align with the shaded boxes for each line. It makes it difficult to tell what line i'm on.
     
    • Agree Agree x 1
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    Should be fixed. :emoji_grinning:
     
    • Like Like x 1
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    Code (Text):
    1.  
    2. test
    3.  
    --- Double Post Merged, Feb 13, 2017, Original Post Date: Feb 13, 2017 ---
    It's still a bit wonky, the code tags are taking up the first and last lines

    [code ]
    code
    [/code ]

    creates a line before and a line after the word 'code'

    Code (Text):
    1.  
    2. code
    3.  
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    That's because you are adding a return. Don't do that and it'll look correct.
     

Share This Page

Loading...