Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (1)

Powered by Vanilla. Made with Bootstrap.
Odd spacing with code tags.
  • sangf
    Posts: 203
    this is extremely minor, but i find it annoying. sometimes code displayed with the code tags (or php tags for that matter) has starting spaces removed from it, demeaning the whole reason for having a code tag besides using a fixed-width font (INDENTATION).

    example:

    centered title
    ------------------------------


    what it should look like (with non-breaking spaces)

           centered title
    ------------------------------


    it generally works well in cases where you actually need it though, but this for example.. if.. let's say the "/" wasn't included on the first line, the spaces would be removed from the code area for the first line only. i've experienced it on multiple lines however, so it's not just that.

    /
    |¯¯¯¯¯¯¯¯¯¯| |¯¯¯¯¯¯¯¯¯¯¯¯|
    | c_parser | <------| input_file |
    |__________| |____________|
    |
    |
    |
    v

    |¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
    | c_asm_optimizer |
    |_________________|
    |
    |
    |
    v

    |¯¯¯¯¯¯¯¯¯¯¯¯¯| |¯¯¯¯¯¯¯¯¯¯¯¯¯|
    | c_assembler |------> | output_file |______,
    |_____________| |_____________| |
    |
    |
    |
    |
    |¯¯¯¯¯¯¯¯¯¯| |
    | c_parser | <------'
    |__________|
    |
    |
    |
    v

    |¯¯¯¯¯¯¯¯¯¯¯¯| |¯¯¯¯¯¯¯¯¯¯¯¯¯| |¯¯¯¯¯¯¯¯|
    | c_debugger | <------| c_interpret |------> | stdout |
    |____________| |_____________| |________|
    |
    | ^
    | |
    | |
    | |
    '¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯'


    it would also be awesome if we could add a title in the code tag, to make some use of that much wasted space after "Code:" in the box; much similar to how you can add text for a quote using ="text" in the tag itself. ie.


    [code=\"main.cpp\"]
    [code=\"This code does something really cool.\"]


    [spoiler]
                      at least it's not this bad
    ------------------------------------------------------------

         |¯¯¯¯¯¯¯¯¯¯|        |¯¯¯¯¯¯¯¯¯¯¯¯|
         | c_parser | <------| input_file |
         |__________|        |____________|
              |
              |
              |
              v

      |¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
      | c_asm_optimizer |
      |_________________|
              |
              |
              |
              v

       |¯¯¯¯¯¯¯¯¯¯¯¯¯|        |¯¯¯¯¯¯¯¯¯¯¯¯¯|
       | c_assembler |------> | output_file |______,
       |_____________|        |_____________|      |
                                                   |
                                                   |
                                                   |
                                                   |
                               |¯¯¯¯¯¯¯¯¯¯|        |
                               | c_parser | <------'
                               |__________|
                                     |
                                     |
                                     |
                                     v

        |¯¯¯¯¯¯¯¯¯¯¯¯|        |¯¯¯¯¯¯¯¯¯¯¯¯¯|         |¯¯¯¯¯¯¯¯|
        | c_debugger | <------| c_interpret |------>  | stdout |
        |____________|        |_____________|         |________|
              |
              |                                            ^
              |                                            |
              |                                            |
              |                                            |
              '¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯'
    [/spoiler]
  • George
    Posts: 707
    I see no problem here, the code tags are acting as they should.
  • Sh3llc0d3
    Posts: 1,910
    -Archived-

    Man you worked alot on that drawing ;) I think it's just a quirk with the spacing in the mycode. It's bareable :)