FORUM ARCHIVED

The [code] markup has a bug.

Discussion in 'Feedback & Suggestions' started by Glazed, May 11, 2012.

  1. Glazed

    Glazed Member

    I post a lot of preformatted text using the code markup. There's a bug where the forum deletes some of my spaces.

    Here's an example of a block of text that is perfectly aligned into columns in my text editor. Yet, when I submit this, it's going to remove one space after "Demon", and several other words. There should be 7 spaces after "Demon" and only 6 get saved. However, if I edit the post after submitting and paste in the exact same text a second time, it will keep all of my spaces. Very strange! However, if I edit the post a second time it will mess it up again unless I paste in fresh text again.

    Here is an example of text I will enter once, and never update after I submit this:

    Code:
    Animal      52
    Demon      30
    Other      16
    Undead      15
    Vegetable  14
    Construct  14
    Here is one that I will paste in, edit the post, paste it in fresh again, then edit this post a third time without re-pasting it.

    Code:
    Animal      52
    Demon      30
    Other      16
    Undead      15
    Vegetable  14
    Construct  14
    This block will be pasted in the first time, left alone during the first edit, but then pasted in fresh before I submit my second edit. Only this one will appear accurately.

    Code:
    Animal      52
    Demon       30
    Other       16
    Undead      15
    Vegetable   14
    Construct   14
     
  2. Glazed

    Glazed Member

    Making another post to test a hypothesis. I also don't want to mess up the post above. (Well, I had to edit it anyway, after all for clarity.)

    The problem happens as soon as you click the Insert button in the Insert Code dialog. If I count the spaces after clicking Insert, it's 6 after "Demon" instead of 7. If I hand-type in the Code markup, then my text will be accurate when it first gets posted. However, as soon as I click Edit to edit the post, it removes some of the spaces.
     
  3. deek

    deek Controller of Bits Staff Member

    I'll take a look and see whats causing problems.
     
  4. deek

    deek Controller of Bits Staff Member

    Are you using tabs to format things in your text editor?
     
  5. Glazed

    Glazed Member

    No, definitely not.