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:
parent
306d99f7d6
commit
dcdc5fb421
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue