Skip to content

Commit

Permalink
issue #9584 Warning "Illegal command \ifile found as part of a \c com…
Browse files Browse the repository at this point in the history
…mand" in \copydoc, but not original documentation

The (internal command `\ifile`, for better warnings ) was placed directly after the existing pext an so the `\ifile` was part of of the `nullptr` text.
Problem occurred only when no other text followed.
We need a `<space>` as well as the, internal, command  `\ilinebr` e.g. for the `\addindex` command as this would run to the end of the line and would with a space still show the same problems.
  • Loading branch information
albert-github committed Sep 7, 2022
1 parent c345c22 commit e7c91b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/docparser.cpp
Expand Up @@ -1826,20 +1826,20 @@ QCString DocParser::processCopyDoc(const char *data,uint &len)
context.copyStack.push_back(def);
if (isBrief)
{
buf.addStr("\\ifile \""+QCString(def->briefFile())+"\" ");
buf.addStr(" \\ilinebr\\ifile \""+QCString(def->briefFile())+"\" ");
buf.addStr("\\iline "+QCString().setNum(def->briefLine())+" ");
uint l=static_cast<uint>(brief.length());
buf.addStr(processCopyDoc(brief.data(),l));
}
else
{
buf.addStr("\\ifile \""+QCString(def->docFile())+"\" ");
buf.addStr(" \\ilinebr\\ifile \""+QCString(def->docFile())+"\" ");
buf.addStr("\\iline "+QCString().setNum(def->docLine())+" ");
uint l=static_cast<uint>(doc.length());
buf.addStr(processCopyDoc(doc.data(),l));
}
context.copyStack.pop_back();
buf.addStr("\\ifile \""+context.fileName+"\" ");
buf.addStr(" \\ilinebr\\ifile \""+context.fileName+"\" ");
buf.addStr("\\iline "+QCString().setNum(lineNr)+" ");
}
else
Expand Down

0 comments on commit e7c91b6

Please sign in to comment.