As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

CODE tags does not display odd numbers of spaces greater than one

ecco the dolphinecco the dolphin Registered User regular
Hi!

I was just trying to visually format something using the
tags, and I've noticed that it doesn't seem to display odd numbers of spaces (greater than one).

For example:

[code]
ABC <- This has no space before the ABC
 BCD <- This has one space before the BCD
  CDE <- This has two spaces before the CDE
   DEF <- This *should* have three spaces before the DEF, but appears to have only two
    EFG <- This has four spaces before the EFG
     FGH <- This *should* have five spaces before the FGH, but appears to have only four
      GHI <- This has six spaces before the GHI
       HIJ <- This *should* have seven spaces, before appears to have only six

This also occurs if the spaces are in the middle of text:
ABCD <- No space
A CDE <- One space
A  DEF <- Two spaces
A   EFG <- Should be three, but appears to be two
A    FGH <- Four spaces
A     GHI <- Should be five, but appears to be four
A      HIJ <- Six spaces
A       IJK <- Should be seven, but appears to be six

I'm pretty sure that I've typed in the stated number of spaces.

It's no big deal, I'll just space things using periods for now, but was wondering if this was a known issue/a workaround is available.

Penny Arcade Developers at PADev.net.
ecco the dolphin on

Posts

  • Options
    EchoEcho ski-bap ba-dapModerator mod
    edited June 2008
    Looks like the forum does silly stuff with the HTML.

    Bild1-2.png

    When HTML renders whitespace it trims down multiple spaces and renders them as one single space -- unless you use a non-breaking space, which says "use a space here goddamnit". Seems to be some SNAFU in the code that skips one nbsp at the end of odd numbers of whitespace.

    I thought that the code HTML tag was meant to preserve whitespace as-is, but I can't find anything about that anywhere in HTML specs.

    Echo on
  • Options
    BarrakkethBarrakketh Registered User regular
    edited June 2008
    Echo wrote: »
    I thought that the code HTML tag was meant to preserve whitespace as-is, but I can't find anything about that anywhere in HTML specs.

    That is what the pre HTML tag is for.

    EDIT: Edited to help alleviate confusion for people like Willeth ;-)

    Barrakketh on
    Rollers are red, chargers are blue....omae wa mou shindeiru
  • Options
    WillethWilleth Registered User regular
    edited June 2008
    This post is a failed test - thought that pre tags were bbcode, not HTML :P

    Willeth on
    @vgreminders - Don't miss out on timed events in gaming!
    @gamefacts - Totally and utterly true gaming facts on the regular!
Sign In or Register to comment.