Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

In case that we have /* in the XML code, it compiles as a comment. While, it doesn't mean comment in XML. How can we avoid it. This is an Example.

I have tried

<!-- language: lang-xml-->

but it doesn't work:

share|improve this question
I don't know why in this question the highlighting is ok, but in the example that I sent it is highlighted as comment – Afshin Moazami Oct 31 '13 at 16:58
To answer you question, the highlighting in this question was ok because it was resolving the type (xml) by it self. Where as in the quesiton it was resolving the type to java since the question is tagged as java. – Hugo Dozois Oct 31 '13 at 17:36
up vote 7 down vote accepted

Like this!

Your problem is that you wrote <!--language: lang-xml--> instead of <!-- language: lang-xml --> (See the missing space between lang-xml and -->!)

Without the typo:


With the typo:

share|improve this answer
I tried it on your post without submitting the edits and it works. – Hugo Dozois Oct 31 '13 at 17:13
StackEdit is silly in this regard then, spaces are not required after or before double-dashes ( – Brian Oct 31 '13 at 17:20
@0A0D Maybe he is silly, but still he doesn't have to be fully html standard compliant though. – Hugo Dozois Oct 31 '13 at 17:21
Well if you are going to use HTML I would expect you to comply. – Brian Oct 31 '13 at 17:22
@0A0D actually is not directly using html since it transforms the "markup" used to html (in this case it is a pre tag). So it could be considered as a special form of markup which is a subset of the html standard. – Hugo Dozois Oct 31 '13 at 17:25
Yes, I know, but it's too strict and silly to have as a requirement when the parser simply has to look for the end tag. – Brian Oct 31 '13 at 17:27

You must log in to answer this question.

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