|
Hi,
One of my recent articles (ie Advanced using OData in .NET: WCF Data Services[^]) didn't get the link 'Download source' pointing to the source code associated to the article.
I never put it myself before and a more recent article (from me) has it, so... is it something that is supposed to be put automatically by the site?
If not, is there a quick procedure explaining how I could do it myself?
Cheers,
Vincent-Philippe Lauzon
|
|
|
|
|
Iv'e added the link to your article's text.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Oh, excellent!
Thanks!
Vincent-Philippe Lauzon
|
|
|
|
|
I noticed this in the QA forums (not sure if it's more general than that). But white spaces (blank lines) in pre-blocks are stripped off when you submit the post. This is quite annoying. In some cases I manually entered //... comments to artificially create white-space, but it's hard to do that for every code snippet I post here.
|
|
|
|
|
Is there a specific post you can point me to? I've been testing locally and can't replicate it but it has been reported before so maybe a specific sample will help me isolate it faster.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Chris Maunder wrote: Is there a specific post you can point me to? I've been testing locally and
can't replicate it but it has been reported before so maybe a specific sample
will help me isolate it faster.
The bug strips off the white-space prior to saving. So even if I point you to an example post, when you edit it, you'll not see my original post.
But the problem exists in this forum too (and any other forum too I guess). Here's an example:
namespace Example
{
static void Main()
{
Employee emp1 = new Employee()
{
Id = 1,
FullName = "Joe Smith",
HoursWorked = 10
};
Employee emp2 = new Employee()
{
Id = 2,
FullName = "Sally Brown",
HoursWorked = 11
};
}
}
}
namespace Example
{
static void Main()
{
Employee emp1 = new Employee()
{
Id = 1,
FullName = "Joe Smith",
HoursWorked = 10
};
Employee emp2 = new Employee()
{
Id = 2,
FullName = "Sally Brown",
HoursWorked = 11
};
}
}
}
I have two examples here. In the first one I used a newline which the site will strip away resulting in ugly code. In the 2nd one I added a dummy //... comment to act as my newline.
|
|
|
|
|
Which browser are you using? I am seeing the blank line nicely in Chrome, FF4, IE9, Opera, Safari.
Update: OK, I see it in IE8. It's a standards issue then. Thanks IE. No, really.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Chris Maunder wrote: Update: OK, I see it in IE8. It's a standards issue then.
Yeah but this is a recent problem, so what did you change that broke it in IE8?
|
|
|
|
|
Okay, one difference between QA and normal forums.
In QA, if I post a code snippet with white space, the white space is removed on saving. So when I edit/improve it, I see the white-space removed version.
In these forums, the white space does not render in the browser, but when I edit the post, I see my original code with the white space.
Not sure if this helps you figure out the problem but thought I'd mention it.
|
|
|
|
|
As far as I can tell the issue is with the way IE handles the white-space style. In IE7 and below it collapses adjacent newlines into a single newline (similar to how it collapses adjacent spaces into 1), but in IE9 it respects newlines.
The only way I can get it to keep the blank line in IE8 is to use the tried and true method of just inserting a single space on the line you want to keep as a blank line.
I'll take a look at the QA editor and see what's happening there. Maybe that will provide an extra clue.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Chris Maunder wrote: I'll take a look at the QA editor and see what's happening there. Maybe that
will provide an extra clue.
There, you can see the effect live. If you have a pre-block, and you enter a newline, the preview below will not show the newline. And once you submit, and then edit/improve you'll have lost the new lines by that point. So that may actually be a different bug.
|
|
|
|
|
Are you seeing any difference for IE7 in forums now?
For me it's working fine, but I am suspecting that my multiple installs of IE are starting to get on each others' nerves.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
I have IE8. Let me do a quick test:
class A
{
}
class B
{
}
class C
{
}
|
|
|
|
|
Nope - still problems. OK - I'll see what's going on.
Working fine on our dev boxes so looks like we've sorted it out.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Nope
IE 8 won't show the newlines!
|
|
|
|
|
Seems that solution numbers are completely missing in Q&A posts. Happens at least with Chrome and IE8.
|
|
|
|
|
Well, you did complain about them yesterday.
|
|
|
|
|
Yep, that's right. Now it's fixed
|
|
|
|
|
Yes, because there were comments about confusion about numbers changing when answers changed order so I removed them.
It now looks dumb and I'm adding them back. The correct solution to avoid confusion is to label them as they were submitted which will be added to the TODO list.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
|
I thought all posts would be wiped out when the blog went public so it could "start fresh". Is this no longer true?
|
|
|
|
|
Found and fixed the issue. Thanks Hans.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
When you view existing solutions to questions, the current vote is no longer shown - it always looks like tehre have been no votes.
If you add a vote, then the cumulative value appears, as does the total number of votes.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
Yeah its been discussed a bit on this thread Always No votes lost privileges[^]
As barmey as a sack of badgers
Dude, if I knew what I was doing in life, I'd be rich, retired, dating a supermodel and laughing at the rest of you from the sidelines.
|
|
|
|
|
Yeah, I noticed that after I posted it...
I checked the "known bugs list first, in my defence!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|