4 Replies Latest reply on Oct 4, 2018 8:40 PM by Timo Hahn

    Can a Line Start with Exactly One Space?

    Frank Kulash

      Hi,

       

      Inside a <pre> element, can we have a line where the first character is a space, and the second character isn't?

      For example, I tried to post the results of a query:

       

      N                AMT G  GRPING_ID     GRP_ID

      --------- ---------- - ---------- ----------

      A1                 2 A          0          0

      A2                 3 A          0          0

      A3                 4 A          0          0

      Subtotal          9 A          1          0

      B1                 3 B          0          0

      B2                 5 B          0          0

      Subtotal          8 B          1          0

        Total           17            3          0

       

      I entered one space before 'Subtotal'.  As I typed the text, it looked fine, and all the columns lined up nicely, but after I clicked on the "Post" button, this site had removed the leading spaces before 'Subtotal'.  It keeps the two spaces before 'Total', but not the one space before 'Subtotal".  Explicitly using  & nbsp;     there didn't help.

       

      This came up in reply #7 of cube vs roll-up vs grouping set

        • 1. Re: Can a Line Start with Exactly One Space?
          Dude!

          From what I understand, the problem is the automatic structured text to table conversion.

           

          Please see Is there any way to turn off text to table in the editor?

          • 2. Re: Can a Line Start with Exactly One Space?
            Timo Hahn

            If you use html you can add a '&nbsp' instead of the blank. This character will not be removed but render as a blank.

             

            Timo

            • 3. Re: Can a Line Start with Exactly One Space?
              Frank Kulash

              Hi, Timo and Dude,

               

              Thanks for looking into this.

               

              I did try   & nbsp;   (without the space).  Editing this message, I clicked on "<HTML>" at the top right of the tool bar and got into the HTML editor. I changed the spaces before "Subtotal" to   & nbsp;    and also added   & amp;nbsp    (again, without the space)  after "Testing".  When I click on "Show full editor" I looks just like I want it to.  Then I click "Save Reply", and it's back to how it appears below.  The spaces before  "Subtotal" are just spaces again, and    &amp; nbsp;   after "Testing" is gone.

               

               

               

              Testing

               

              N                AMT G  GRPING_ID    GRP_ID

              --------- ---------- - ---------- ----------

              A1                2 A          0          0

              A2                3 A          0          0

              A3                4 A          0          0

              Subtotal          9 A          1          0

              B1                3 B          0          0

              B2                5 B          0          0

              Subtotal          8 B          1          0

                Total          17            3          0

              • 4. Re: Can a Line Start with Exactly One Space?
                Timo Hahn

                Well, this editor is a mess

                A non breakable space (nbsp) should work and works if you save the table as html and show it in a browser. Here the character is simply deleted.

                 

                Timo