Answered by:
Formatting of code samples

Question
-
A big problem in the forums is posting code samples. To start with, the intended feature is not very easily discoverable, and when people copy and paste from a editor, the UI regularly mangles the code.
But not even if you play by the rules, it's simple. First look at
http://www.sommarskog.se/temp/code.html
Then look at this thread in the Sandbox forum where I've made three attempts to get this text properly formatted
http://social.msdn.microsoft.com/Forums/en-US/msdnsandbox/thread/235033a1-b308-49d4-9965-3f85c8226558The first two posts are from the NNTP Bridge. The last posted I added directly in the web UI.
I normally use the NNTP Bridge, and I believe that my code samples came through OK in the past. Currently, they don't. I have version 44 of the NNTP bridge. I have set PostAreAlwaysFormatFlowed to False, this used to work well in the past. I have UsePlainTextConverter to SendAndReceive.
But not even the last post is OK. Despite the preview shows the code with fixed font, the code is displayed with a proportional font!
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Answers
-
Maybe I am missing something... but what problem do you see with the bridge and the converter?
Hi, Jochen. It was quite a while ago that I tested and gave up--don't know which version of the bridge I would have been using then. IIRC there were strange problems with line spacing? Other weird things. I have always used WLMail for my NNTP newsreader which is more HTML oriented than Plain-text oriented so it was just easier leaving those problems undiagnosed. Since then though others have mentioned seeing some of the same symptoms and I have told them about my practice of avoiding the converters, just as I did with Erland in this thread. Of course if Erland is using a plain-text only newsreader it would be impractical for him to try what I suggested, so then if the bridge is contributing to the symptoms such delayed diagnoses might now become necessary. ; )FWIW I found my testing about this
http://social.microsoft.com/Forums/hi-IN/comsandbox/thread/5a166e21-e478-4bdf-886e-b7f74549e5a6
(originally posted on en-us of course.)
The previous month I had been testing V24
http://social.microsoft.com/Forums/en-US/comsandbox/thread/47ec31a2-5e67-47ec-b738-d0f0d64d8f9f
Robert
---- Proposed as answer by Ed Price - MSFTMicrosoft employee Friday, January 6, 2012 7:05 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Thursday, January 26, 2012 6:47 PM
All replies
-
A big problem in the forums is posting code samples.
Have you tried using the new editor on the CTP MSDN Sandbox? One of the new features is some kind of improvement to the code feature.If you like there is a way to test it using the Community NNTP bridge too.
Good luck
Robert
--- -
-
FWIW I gave up on all of the bridge's converters. Just use HTML as a pass-through. Then the only problem I have is dealing with the UI deficiencies in WLMail in HTML mode. ; )
That seems insanely difficult. Do you mean that everytime I make a post I should start typing <HTML><BODY> and so on?
Yes, I am using a plain-text newsreader.
I will test how the CTP sandbox work with the NNTP bridge later. Seen from the Web UI perspective, I didn't see much point with it.
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se -
-
Maybe I am missing something... but what problem do you see with the bridge and the converter? For me, your original and the posting throu the bridge looks very similar...
It does? In what browser? I mainly use Firefox, but it did not look any better in Opera or IE. This is how I see the code sample:
http://www.sommarskog.se/temp/badindent.jpg
Do you see anything else?`
Looking at the HTML source:
http://www.sommarskog.se/temp/viewsource.jpg
We can see that there are far too many blanks.
I don't think this issue is with the NNTP bridge, but it is on the Microsoft side. I went back and reviewed old posts, and posts that I made in the end of July looked good. In the middle of August it did not. I also just tested the CTP sandbox, and the indentation was a lot better there (but still in error).
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se -
Maybe I am missing something... but what problem do you see with the bridge and the converter?
Hi, Jochen. It was quite a while ago that I tested and gave up--don't know which version of the bridge I would have been using then. IIRC there were strange problems with line spacing? Other weird things. I have always used WLMail for my NNTP newsreader which is more HTML oriented than Plain-text oriented so it was just easier leaving those problems undiagnosed. Since then though others have mentioned seeing some of the same symptoms and I have told them about my practice of avoiding the converters, just as I did with Erland in this thread. Of course if Erland is using a plain-text only newsreader it would be impractical for him to try what I suggested, so then if the bridge is contributing to the symptoms such delayed diagnoses might now become necessary. ; )FWIW I found my testing about this
http://social.microsoft.com/Forums/hi-IN/comsandbox/thread/5a166e21-e478-4bdf-886e-b7f74549e5a6
(originally posted on en-us of course.)
The previous month I had been testing V24
http://social.microsoft.com/Forums/en-US/comsandbox/thread/47ec31a2-5e67-47ec-b738-d0f0d64d8f9f
Robert
---- Proposed as answer by Ed Price - MSFTMicrosoft employee Friday, January 6, 2012 7:05 PM
- Marked as answer by Ed Price - MSFTMicrosoft employee Thursday, January 26, 2012 6:47 PM