Fix structural Doxygen comment recognition in the parser.

The code wrongly recognized something like "@direction" as a structural "@dir"
comment (why is the latter structural is another question).

Add a check that we've really found the entire tag and not just a prefix of
some other tag.
This commit is contained in:
Vadim Zeitlin 2014-09-04 18:59:55 +02:00
commit dcdc5fb421

View file

@ -115,7 +115,9 @@ int isStructuralDoxygen(String *s){
for (n = 0; n < sizeof(structuralTags)/sizeof(structuralTags[0]); n++) {
const size_t len = strlen(structuralTags[n]);
if (strncmp(slashPointer, structuralTags[n], len) == 0) {
return 1;
/* Take care to avoid false positives with prefixes of other tags. */
if (slashPointer[len] == '\0' || isspace(slashPointer[len]))
return 1;
}
}