-8

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?](https://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?

5
  • 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. – Naftali aka Neal 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.... – Naftali aka Neal 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
5

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

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

will become

<a href="https://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="https://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="https://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.

0

You must log in to answer this question.

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