View Full Version : Code formatting lost?
8 Feb 2012, 7:04 AM
How do you all paste data into a post?
Whenever I try, it looks fine until I submit it. Then all my CR/LF are lost. I've tried pasting into intermediate programs like notepad as well, to no avail.
8 Feb 2012, 7:07 AM
Use code tags (# button) around your code
but / without parenthesis , else I couldn't display it
8 Feb 2012, 7:08 AM
also happens to me a lot!
8 Feb 2012, 7:21 AM
Check out the vBulletin forum cheatsheat:
contains everything you might ever need... and more!
8 Feb 2012, 9:49 AM
Not at all what I'm talking about. I'm very familiar with [CODE] and
Code that I paste looks like this:
But when I save/submit it gets changed to:
code indented code more code
And continues to look this way, even when I go back to edit it. I.e. the CR/LF are really gone, even in edit mode. (Note that spaces are still there - see the gap between "code" and "indented code" above.)
8 Feb 2012, 11:14 AM
strange. what OS & text editor are you using?
All I'm doing on my end is copy-pasting code from TextMate (running on OSX) into Chrome.
My LFs are never removed.
Notepad tends to mess up CRs/LFs -- try notepad++ instead.
8 Feb 2012, 11:18 AM
Notepad++, Windows 7 64bit.
I've also tried to use TextPad and Notepad or both in the middle of the copy/paste process to see if that changes anything. It doesn't. It continues to look fine in each program, as well as the text editor in the forum - until I click submit or save.
8 Feb 2012, 5:09 PM
Another thing to try: I'm using 4 spaces for indentation.
You might also want to check for any clipboard-assist software / browser plugin which removes formatting from copied text.
Have you tried typing code directly into the [code][ /code] tags?
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.