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

Fix poor doxygen indentation choices. #15393

Merged
merged 1 commit into from Jun 21, 2023
Merged

Conversation

bangerth
Copy link
Member

From the comment in the program:

        # Then print the line. doxygen has the annoying habit of eating
        # the maximal number of spaces at the front of each code block,
        # leading to visually wrong indentation if one, for example, has
        # ```
        #   if (cond)
        #   {
        # ```
        # in one block, and then
        # ```
        #     some_function();
        # ```
        # in the next block -- the call to some_function() is not shown any
        # further to the right than the if(cond) before. Work around this by
        # prefixing all code lines with a non-printing Unicode space 0x00A0
        # that doxygen interprets as the first non-space character for
        # determining indentation, but that does not actually print as anything
        # other than a space (and that compilers appear to successfully ignore
        # when one copy-pastes code snippets from the generated doxygen pages
        # into an editor).

Visually, this looks as follows:
image
Note the poor indentation of the second and third code blocks. This patch fixes this.

@bangerth bangerth added this to the Release 9.5 milestone Jun 20, 2023
@bangerth
Copy link
Member Author

With the patch:
image

@tamiko
Copy link
Member

tamiko commented Jun 20, 2023

@bangerth This was annoying me for a long time, thanks for the fix!

@marcfehling marcfehling merged commit d3f0a4a into dealii:master Jun 21, 2023
11 of 14 checks passed
@bangerth bangerth deleted the doxygen branch June 21, 2023 01:21
@bangerth
Copy link
Member Author

Different kinds of whitespace for the win! Which of course brings up good memories of this paper: https://www.stroustrup.com/whitespace98.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants