Results 1 to 8 of 8
  1. #1
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    If you copy VBA code that has been posted between [code] and [/code] tags into a code module, it is pasted as a single line.
    If you paste into Notepad, the same happens.
    If you paste into Word, the line breaks are there, but every other space is a non-breaking space, so if you copy from Word into a code module, the code is not valid.
    So you have to
    • Copy the code in the post.
    • Paste into Word.
    • Replace all non-breaking spaces with ordinary spaces.
    • Copy the code in Word.
    • Paste into the code module.



  2. #2
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,420
    Thanks
    33
    Thanked 195 Times in 175 Posts
    Does this also apply to all the other 'code possibilities' found in "Other styles"?
    Like PHP, HTML, SQL and XML? (No BATch, I see... )
    And no return of the remaining smilies to the small selection currently on offer...
    BATcher

    Time prevents everything happening all at once...

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Let's see:

    SQL:

    [sql]SELECT ThisField, ThatField
    FROM MyTable
    WHERE ID=37[/sql]

    1) This too was squashed onto one line when pasted into Notepad or a code module.

    2) When I try to edit the post, the line feeds disappear too!

  4. #4
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,420
    Thanks
    33
    Thanked 195 Times in 175 Posts
    Quote Originally Posted by HansV View Post
    Let's see:

    SQL:

    [sql]SELECT ThisField, ThatField
    FROM MyTable
    WHERE ID=37[/sql]

    1) This too was squashed onto one line when pasted into Notepad or a code module.

    2) When I try to edit the post, the line feeds disappear too!
    Is this likely to be fixable at some point, do you think? It seems a surprising bug.
    BATcher

    Time prevents everything happening all at once...

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Quote Originally Posted by BATcher View Post
    Is this likely to be fixable at some point, do you think? It seems a surprising bug.
    I don't know whether it's fixable, that's for the support admins to investigate.

  6. #6
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It looks like the code tag issue has been fixed. I am not experiencing the single line pasting issue that HansV describes. I've tried copying from both FireFox and IE8 and both pasted as multiple lines in a module and in Notepad.

  7. #7
    Star Lounger
    Join Date
    Aug 2009
    Location
    Seattle, WA
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've fixed the issues with code blocks you were experiencing. The syntax highlighting script that is enabled by default in newer versions of IPBoard were removing the line breaks and replacing all code formatting with HTML <span> tags; some browsers apparently don't interpret the CSS applied to those tags when dealing with clipboard operations.

    Syntax highlighting is now disabled, and the code appears to copy just fine!

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Thanks, Dan! This makes using code from the Lounge a lot easier again.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •