16

Someone posted a question that started with a code sample, and the sample began by assigning a variable named hello. The input filtering removed that line. I tried to do the same thing in my reply and not only did it consistently remove the line it wrecked the format of the rest of the code sample.

If anyone knows the proper tags to add to this question, please do so.

  • 1
    Looks like you're getting hit by the automatic tagline remover. – Mysticial Nov 27 '13 at 17:02
  • 14
    The better thing to do is to start your post with an explanation of your code, rather than just posting code. – gunr2171 Nov 27 '13 at 17:04
  • 1
    @gunr2171 Even if that's true, the user should probably be alerted that their first line of code was automatically deleted. Most users aren't going to know that they shouldn't start with a code block iff the code block begins with "hello". – Geobits Nov 27 '13 at 17:08
  • Ah! Now that explains why there was the stray hi'] in the post, that I removed. It was rather strange, that first line. – Martijn Pieters Nov 27 '13 at 17:08
  • I strongly suspect that this happened to the OP as well, see the first revision. – Martijn Pieters Nov 27 '13 at 17:09
  • @MartijnPieters, I assumed it had based on a comment under the question. – Mark Ransom Nov 27 '13 at 19:11
  • 1
    @gunr2171, is there a rule that the explanation must come before the code rather than after it? – Mark Ransom Nov 27 '13 at 19:13
  • 2
    @MarkRansom, there is no rule, I would just find it easier to read. – gunr2171 Nov 27 '13 at 19:21
1

Fixed it by adding an empty comment block before your code. The problem is that we have a filter set in place that automatically removes "Hello", "Thanks", etc. lines from the post when you save.

As others have said in the comments though, you should add an explanation of the code.

  • Thanks, but that's just a hack for this particular post. I started the question hoping the filter could become more finely tuned for everyone. – Mark Ransom Dec 3 '13 at 3:43
  • 1
    @Mark IMHO, the filter is crap. It doesn't seem to work anymore. Unless I can see done stats on its success, I'm against it. – Cole Johnson Dec 3 '13 at 3:46
  • 1
    I guess I can't argue with that. I always thought Jeff's rationale was a little questionable. – Mark Ransom Dec 3 '13 at 4:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .