Permalink
Browse files

wrong message for double hyphen in comment XML error

The error message when you have a double hyphen in a comment is "comment
not terminated" and should be "double hyphen in comment".
  • Loading branch information...
1 parent 71a243d commit 8658d27d4fc13c2ea1a2d127eb7ce06ac7f8bd19 @giraffedata giraffedata committed with veillard May 8, 2012
Showing with 7 additions and 6 deletions.
  1. +7 −6 parser.c
View
@@ -4778,13 +4778,14 @@ xmlParseComment(xmlParserCtxtPtr ctxt) {
ctxt->instate = state;
return;
}
- if (buf != NULL)
- xmlFatalErrMsgStr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
- "Comment not terminated \n<!--%.50s\n",
+ if (buf != NULL) {
+ xmlFatalErrMsgStr(ctxt, XML_ERR_HYPHEN_IN_COMMENT,
+ "Double hyphen within comment: "
+ "<!--%.50s\n",
buf);
- else
- xmlFatalErrMsgStr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
- "Comment not terminated \n", NULL);
+ } else
+ xmlFatalErrMsgStr(ctxt, XML_ERR_HYPHEN_IN_COMMENT,
+ "Double hyphen within comment\n", NULL);
in++;
ctxt->input->col++;
}

0 comments on commit 8658d27

Please sign in to comment.