No announcement yet.

How to preserve blank lines in posted code

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to preserve blank lines in posted code

    When transferring code to the PB forum editor with copy and paste, the code tags prevent the editor to remove the indentation, but they do not prevent the removal of blank lines.

    As blank lines often serve to separate blocks of code, this removal is usually not desirable and reduces the clarity of the code.
    Although it is possible to manually reinsert the blank lines, this is not a practical solution for larger sections of code.
    Does anyone have special tips or tricks to prevent the removal of blank lines when pasting code into the editor ?

    Arie Verheul

  • #2
    Try quoting the message, and then cutting from the quoted code part.

    -- The universe tends toward maximum irony. Don't push it.

    File Extension Seeker - Metasearch engine for file extensions / file types
    Online TrID file identifier | TrIDLib - Identify thousands of file formats


    • #3
      He meant going to, pasting from works. To keep the blank lines in your code when making a message, make sure thare is something on the line as just the CrLf are ignored. Usually I put at least 1 space on all blank lines then they will show up.
      Mobile Solutions
      Sys Analyst and Development


      • #4

        As simple as that. Thanks !

        Arie Verheul


        • #5
          Use same technique to expand tab stops?

          How about expanding tab stops?
          For some reason I've had postings expand correctly.
          Does the number of positions make a difference?

          Appears I was accidently starting with (/code), sorry.
          Last edited by Mike Doty; 29 Dec 2008, 03:58 PM.