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

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

1 Answer 1

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:

<project>
    <excludes>
        <exclude>**/*.properties</exclude>
    </excludes>
<project>

With the typo:

<project>
    <excludes>
        <exclude>**/*.properties</exclude>
    </excludes>
<project>
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 (w3.org/TR/REC-html40/intro/sgmltut.html#h-3.2.4) –  staticx 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. –  staticx 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
1  
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. –  staticx 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 .