What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

When testing out The HTML comment Length hack and I was trying to make the Duplicate Link message a comment itself I came across this curious predicament:

This is the markup:

<!-- **Possible Duplicate:**  >
<!--[Should HTML comments be stripped when validating answer length?](http://meta.stackexchange.com/questions/25344/should-html-comments-be-stripped-when-validating-answer-length)  -->

But it looks like this:

Should HTML comments be stripped when validating answer length?-->


Shouldn't the link be commented out?

Why is it showing as plain-text, is this a Markdown or SE issue?

share|improve this question
    
First you want to eliminate the "feature" altogether, now you're filing bug reports about it? –  Cody Gray Feb 27 '12 at 18:26
    
@CodyGray You misunderstand. I never wanted to eliminate it. I was wondering why I was able to do it. If elimination is necessary, then so be it. –  amanaP lanaC A nalP A naM A Feb 27 '12 at 18:28
3  
Are you going to spawn a new meta question for every little issue you find with this? –  BoltClock's a Unicorn Feb 27 '12 at 18:29
    
@BoltClock'saUnicorn No I will not. I am just curious. And if people do not like my curiosity, I guess they can vote me down.... –  amanaP lanaC A nalP A naM A Feb 27 '12 at 18:30
7  
@BoltClock'saUnicorn You must be new to his mode of operation -- it's really quite simple: 1) Notice something on SO. 2) Write a meta post about it immediately –  Michael Mrozek Feb 27 '12 at 19:13

1 Answer 1

I'm pretty sure it's just the way that Markdown runs through things.

[Should HTML comments be stripped when validating answer length?](http://meta.stackexchange.com/questions/25344/should-html-comments-be-stripped-when-validating-answer-length)

will become

<a href="http://meta.stackexchange.com/questions/25344/should-html-comments-be-stripped-when-validating-answer-length">Should HTML comments be stripped when validating answer length?</a>

first, which creates this:

<!-- **Possible Duplicate:**  >
<!--<a href="http://meta.stackexchange.com/questions/25344/should-html-comments-be-stripped-when-validating-answer-length">Should HTML comments be stripped when validating answer length?</a>  -->

Then the Markdown parser starts removing HTML that it doesn't allow:

It removes <!-- **Possible Duplicate:** > first.

Then it sees <!--<a href="http://meta.stackexchange.com/questions/25344/should-html-comments-be-stripped-when-validating-answer-length"> as one unsupported element and removes it.

Then it removes the </a>.

And you're left with Should HTML comments be stripped when validating answer length? -->.

Edit: As explained before, Markdown just goes from < to >. It doesn't look at comment syntax.

share|improve this answer

You must log in to answer this question.

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