none
Code blocks are annoying! RRS feed

  • Question

  • If you write code in the post editor, then highlight it and click "Format Code Block", it gives you a bunch of HTML tags to format instead of my raw code.

    E.g. if you write something like:

    void Foo()
    {
       // Some code
    }

    Then highlight it and click Format Code, you get:

    void Foo()<br>{<br>&nbsp;&nbsp; // Some code<br>}

    in your code editor!

    Arrgh.

    Can we *please* just have a [code] [/code] tag and be done with it?!

    Thursday, June 12, 2008 7:56 AM

Answers

All replies

  • Scorpion:

    Yes, this is extremely annoying. The old forum allowed you to paste some code in the Reply window, and then select it and format it. Now (it seems) you have to first open the formatter, and then paste (or type) your code into the formatter.

    Surely the new formatter should be smart enough to figure this out?

    There are also some other strange features with the formatter. For example it does not see possible to remove a code block once you have created one.


    David Wilkinson | Visual C++ MVP
    Friday, June 13, 2008 3:18 PM
  • How is it now?

    Ed Price a.k.a User Ed, Microsoft Experience Program Manager (Blog, Twitter, Wiki)

    Wednesday, February 8, 2012 1:01 AM
    Owner
  • How is it now?

    Ed Price a.k.a User Ed, Microsoft Experience Program Manager (Blog, Twitter, Wiki)


    I almost always use the NNTP Bridge now.

    David Wilkinson | Visual C++ MVP

    Wednesday, February 8, 2012 12:48 PM
  • The very latest editor has a few problems, one of them being the wrong coloring.

    For every expert, there is an equal and opposite expert. - Becker's Law


    My blog

    Wednesday, February 8, 2012 2:08 PM
    Moderator
  • Understood. But this particular issue seems fixed. I believe we have at least one thread open about the coloring issue.

    Ed Price a.k.a User Ed, Microsoft Experience Program Manager (Blog, Twitter, Wiki)

    Thursday, February 9, 2012 6:04 AM
    Owner