none
format tool defective RRS feed

  • Question

  • I just created this post in the sandbox:
    http://forums.msdn.microsoft.com/en-US/msdnsandbox/thread/b0babad7-33c6-4275-a58d-7cd32e61d262

    When I selected a code segment to format, the display shows the HTML code and does not interpert it.  The code block is unreadable.

    What the heck, do it here:

    Here is the original:

    void CGalactic_Body_Editor::OnBnClickedOk()

    { GB_color_combo_string.GetWindowTextW( str );}



     

     
    <style="MARGIN: 0in 0in 0pt"><SPAN   
    style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">void</SPAN><SPAN   
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">   
    CGalactic_Body_Editor::OnBnClickedOk()</SPAN></P>  
    <style="MARGIN: 0in 0in 0pt"><SPAN   
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">{   
    GB_color_combo_string.GetWindowTextW( str );}</SPAN></P


    Above is with the XML default option.

     
    <P style="MARGIN: 0in 0in 0pt"><SPAN   
    style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">void</SPAN><SPAN   
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">   
    CGalactic_Body_Editor::OnBnClickedOk()</SPAN></P>  
    <P style="MARGIN: 0in 0in 0pt"><SPAN   
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">{   
    GB_color_combo_string.GetWindowTextW( str );}</SPAN></P>  
    <P style="MARGIN: 0in 0in 0pt"><BR>&nbsp;</P> 


    above is with C#, no better.


    ~jag77
    Thursday, June 19, 2008 9:35 PM

Answers

  • Avoid pasting the code into your message, selecting it, then clicking the "Format code block" button.  Only paste it in the popup that appears when you click the button.
    Hans Passant.
    Tuesday, June 24, 2008 3:16 AM
  • I will try it. Open a format window, the paste in. 

    void CGalactic_Body_Editor::OnBnClickedOk()  
     
    { GB_color_combo_string.GetWindowTextW( str );}  
     // Edit some more text in after closing that window and returning to the main 
     // post/reply window.
     // and two more lines so make it grow
     // looking ok.
     // and a paste.
    void CGalactic_Body_Editor::OnBnClickedOk()  
     
    { GB_color_combo_string.GetWindowTextW( str );}  
     

     Okay, that looks much better.  A viable work around.
    Thanks for the information.

    ~jag77
    Tuesday, June 24, 2008 9:37 PM

All replies

  • I agree, it's absolutely broken. I've posted about this before.
    Saturday, June 21, 2008 10:42 AM
  • Thanks JAG77 for reporting.  I'll check into what the latest status on this issue is and get back to you.

    Alicia
    Program Manager, Server and Tools Online Engineering Live Services Team
    Monday, June 23, 2008 6:49 AM
  • Thank you.  I think that many users will appreciate that fix.
    ~jag77
    Tuesday, June 24, 2008 1:00 AM
  • Avoid pasting the code into your message, selecting it, then clicking the "Format code block" button.  Only paste it in the popup that appears when you click the button.
    Hans Passant.
    Tuesday, June 24, 2008 3:16 AM
  • The problem is that I often write code directly in the post editor (on the fly), then select it, and click "Format Code".

    Sure, I discovered that work-around too, but it's still a broken formatter.
    Tuesday, June 24, 2008 4:11 AM
  • I will try it. Open a format window, the paste in. 

    void CGalactic_Body_Editor::OnBnClickedOk()  
     
    { GB_color_combo_string.GetWindowTextW( str );}  
     // Edit some more text in after closing that window and returning to the main 
     // post/reply window.
     // and two more lines so make it grow
     // looking ok.
     // and a paste.
    void CGalactic_Body_Editor::OnBnClickedOk()  
     
    { GB_color_combo_string.GetWindowTextW( str );}  
     

     Okay, that looks much better.  A viable work around.
    Thanks for the information.

    ~jag77
    Tuesday, June 24, 2008 9:37 PM