none
Extra line breaks introduced by editor. please fix it! RRS feed

  • Question

  • When are you going to fix this:

    You paste copy some code, and paste it in the post editor, and for some reason it inserts all kinds of extra line breaks.

    Stack<int> intStack = new Stack<int>();
    
    Dictionary<string, string> dictionary = new Dictionary<string, string>();
    
    public void MyGenericMethod(T x, T y)
    
    {
    Console.Writeline("Parameters type is {0}", typeof(T));
    }
    
    Friday, January 8, 2010 4:04 PM

Answers

  • right...ok.

    But hopefully fixing the problem is still on the roadmap, because I'm looking to avoid the problem in other people's posts as well.  I'm clearly not the only one falling victim. 

    Obvious, intuitive user behaviour causes the problem, so it's a failing of the forum software.
    Sunday, January 10, 2010 4:30 AM
  • Was it plain text, or text that had previously been formatted by the code editor? As I said, I only ever paste plain text.

    Also I have heard that FireFox does a better job than IE of pasting text (not sure if this is in the code editor or not). I use Mozilla browser, which is much like FireFox.

    David Wilkinson | Visual C++ MVP
    Friday, January 8, 2010 5:15 PM

All replies

  • All I did is copy the code above, and paste it into this reply.

    Stack<int
    > intStack = new
     Stack<int
    >();

    Dictionary<string , string > dictionary = new Dictionary<string , string >();

    public void MyGenericMethod(T x, T y)

    {
    Console.Writeline("Parameters type is {0}" , typeof (T));
    }
    Friday, January 8, 2010 4:04 PM
  • The code editor is a total abomination.

    Personally, I never use it. I just paste plain text into the main composition window.

    David Wilkinson | Visual C++ MVP
    Friday, January 8, 2010 4:55 PM
  • Here's a situation where I copied text and pasted it though, I didn't ever invoke the code editor, it was just the main composition window.  The text that was copied somehow got pasted in such a way that it was drastically reformatted (presumably indirectly by the code formatting logic), and in the process came out borked.

    Friday, January 8, 2010 4:58 PM
  • Was it plain text, or text that had previously been formatted by the code editor? As I said, I only ever paste plain text.

    Also I have heard that FireFox does a better job than IE of pasting text (not sure if this is in the code editor or not). I use Mozilla browser, which is much like FireFox.

    David Wilkinson | Visual C++ MVP
    Friday, January 8, 2010 5:15 PM
  • I'm using firefox, and I literally selected the formatted text from the post above and copied it, then pasted it.  So I guess it's not plain text.  It's whatever firefox copies it as.  But that text, when pasted, it appears correct within the main composition window , but when you hit submit, the final posted formatted version looks like junk, with extra line breaks.  Why does it look okay at first glance, but it's screwed up after submitting? 

    You can try it yourself.  Try it in this thread.  Or even in the sandbox forum.
    Saturday, January 9, 2010 3:33 AM
  • Ah, OK. I always just paste plain text.

    There is a free application called PureText that will paste the contents of the clipboard in plain text. I have it set up with the hotkey "Windows + V". So it works just like "Alt + V". It plays a little sound to remind you what you did (but you can turn it off).

    David Wilkinson | Visual C++ MVP
    Saturday, January 9, 2010 12:40 PM
  • right...ok.

    But hopefully fixing the problem is still on the roadmap, because I'm looking to avoid the problem in other people's posts as well.  I'm clearly not the only one falling victim. 

    Obvious, intuitive user behaviour causes the problem, so it's a failing of the forum software.
    Sunday, January 10, 2010 4:30 AM