Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doxygen doesn't correctly treat nested \if statements #9779

Closed
StefanBattmer opened this issue Jan 10, 2023 · 7 comments
Closed

Doxygen doesn't correctly treat nested \if statements #9779

StefanBattmer opened this issue Jan 10, 2023 · 7 comments
Labels

Comments

@StefanBattmer
Copy link

StefanBattmer commented Jan 10, 2023

Describe the bug
Parts of the documentation of the top level \if statement (enabled vis ENABLED_SECTIONS in the doxyfile) end up in the documentation. This is correct but parts from the \else statement end up being in the output as well. I did test this with 1.9.6 and even 1.8.10. Same result.

Expected behavior
Only the enabled stuff should end up being documented

Screenshots
IncorrectOutput

To Reproduce
I attached a version reproducing the effect. Removing BUILD_WITH_A from the ENABLED_SECTIONS results in correct output. This might be related to the fact that then only the \else branch is touched.

Version
1.9.6 but also 1.8.10

DoxygenIssue.zip

@albert-github
Copy link
Collaborator

Problem is also present when using \elseif.

albert-github added a commit to albert-github/doxygen that referenced this issue Jan 15, 2023
Renewed implementation of the `\if ...\endif` structure to better accommodate the nesting of these type of blocks.
@albert-github
Copy link
Collaborator

I've just pushed a proposed patch, pull request #9789

@StefanBattmer
Copy link
Author

@albert-github: Just to make sure: Shall we test this on our end now? I am just asking because the Build of the pull request wasn't successful.

@albert-github
Copy link
Collaborator

That would be much appreciated, you can use the proposed patch at your side (with the current master as base).
The problem with the build of the pull request was just a minor problem in building internal documentation (that already has been fixed in the master version). The failure of the build of the proposed patch does not have anything to do with the proposed patch.

@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Jan 22, 2023
@albert-github
Copy link
Collaborator

Code has been integrated in master on GitHub (please don't close the issue as this will be done at the moment of an official release).

@StefanBattmer
Copy link
Author

@albert-github: I can confirm that this patch does the job! Thanks!

@doxygen
Copy link
Owner

doxygen commented May 18, 2023

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.9.7.
Please verify if this is indeed the case. Reopen the
issue if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label May 18, 2023
@doxygen doxygen closed this as completed May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants