Feneric / doxypypy

A more Pythonic version of doxypy, a Doxygen filter for Python.
GNU General Public License v2.0
149 stars 49 forks source link

Unfortunate interaction between doxypypy and Doxygen markdown support #19

Open quantheory opened 9 years ago

quantheory commented 9 years ago

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.

Feneric commented 9 years ago

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.

nhasbun commented 4 years ago

Any news on this or workaround?

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

silvester747 commented 4 years ago

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