"Bad character" - is it an IDEA bug?
When I type "<!----
>" as a XML comment, IDEA shows an error "Bad character" (please see the screenshot).
Is it an IDEA's bug or is it not acceptable in XML?
Attachment(s):
BadChar.png
Please sign in to leave a comment.
It is xml syntax.
Quote from the http://www.w3.org/TR/2006/REC-xml-20060816/#sec-comments:
For compatibility, the string "--" (double-hyphen) MUST NOT occur within comments.
Thanks, Oleg
But now it's really a bug.
Quote from http://www.w3.org/TR/2006/REC-xml-20060816/#sec-comments
"<!
a->" has "a-" between "<!" and ">"<!
-a-> has "-a-" between "<!" and ">"2 above examples should be correct following XML spec but IDEA still show "Bad character".
deleted
No, you're wrong. If you look closely at the specification is is:
- a sequence of
- either a character but not '-'
- or a '-' followed by
- a character but not '-'
There's no possibility to have a trailing '-'.
t800t8 wrote:
Ah, now I see. Thanks Martin. I'm not familiar with the syntax they used.