doxypypy icon indicating copy to clipboard operation
doxypypy copied to clipboard

Unfortunate interaction between doxypypy and Doxygen markdown support

Open quantheory opened this issue 10 years ago • 3 comments

Take a look at the following block.

class Foo(object):

    def method(self, bar):
        """Do something with Foo.

        More about Foo method.

        Arguments:
            bar: Something to do something with.
        """
        pass

This is converted by doxypypy to:

class Foo(object):

    ## @brief Do something with Foo.
    #
    #        More about Foo method.
    #
    #
    # @param        bar Something to do something with.
    #
    def method(self, bar):
        pass

Since most of the indentation is kept on "More about Foo method." that line is treated as a code block if MARKDOWN_SUPPORT=YES (at least in Doxygen 1.8.5). This will happen only if some part of the comment block (in this case the @param) is indented far enough to the left that the relative difference in indentation is 4 or more spaces.

I'm not sure what exactly doxypypy should do about this, but it seems to me that if it stripped off the minimal indent (for non-blank lines), that would make it easier to avoid issues with MARKDOWN_SUPPORT=YES.

quantheory avatar Nov 18 '14 23:11 quantheory

Hmmm... I think a much earlier version of doxypypy did strip out the indentation there and it was deliberately put back in due to some other unfortunate interaction. I'll have to take a look.

Feneric avatar Jan 17 '15 16:01 Feneric

Any news on this or workaround?

Currently this is the main issue I'm having with doxypypy.

nhasbun avatar Jan 12 '20 08:01 nhasbun

As a workaround I am currently using this as filter:

#!/bin/bash
doxypypy -a -c $1 | sed 's/#        /# /'

An alternative is to disable MarkDown support in the Doxyfile:

MARKDOWN_SUPPORT = NO

silvester747 avatar May 16 '20 13:05 silvester747