Skip to content

Commit

Permalink
Reference to non existing anchor with "More..."
Browse files Browse the repository at this point in the history
When having an anonymous struct, the `More ...` in the detailed description points to a non existing page and anchor. We can see this with e.g.:
```
/// \file

class test {
 public:
    struct {
        double s2_time;  //!< \brief brief time in secs
                         //!< \details details time in secs
    } s2_temp;
};
```

the correction is analogous to the correction for writing the name.
  • Loading branch information
albert-github committed Jan 23, 2022
1 parent e5712aa commit f33248f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/memberdef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2470,7 +2470,19 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.docify(" ");
ol.startTextLink(getOutputFileBase(),anchor());
MemberDefMutable *annMemb = NULL;
if (!isAnonymous()) // hide anonymous stuff
{
annMemb = toMemberDefMutable(m_impl->annMemb);
}
if (annMemb)
{
ol.startTextLink(annMemb->getOutputFileBase(),annMemb->anchor());
}
else
{
ol.startTextLink(getOutputFileBase(),anchor());
}
ol.parseText(theTranslator->trMore());
ol.endTextLink();
ol.popGeneratorState();
Expand Down

0 comments on commit f33248f

Please sign in to comment.