timothycrosley / pdocs

A simple program and library to auto generate API documentation for Python modules.
Other
76 stars 20 forks source link

Replace \n by <br> in table to avoid a poorly rendering for the table in markdown #20

Closed EmGarr closed 1 year ago

EmGarr commented 3 years ago

docstring_parser has been a nice introduction which allows the usage of Google format.

However, the rendering of the table isn't convincing.

If my dosctring is written as follow:

   """
    Arguments:
        weights: a list of Numpy arrays. The number
            of arrays and their shape must match
            number of the dimensions of the weights
            of the layer (i.e. it should match the
            output of `get_weights`).
    """

The doc will be the following:

Capture d’écran 2021-02-07 à 20 45 06

The issue is that \n isn't supposed to be used in a table with markdown. <br> could be used instead.

Capture d’écran 2021-02-07 à 20 51 12

In this PR, I propose to do a quick modification of text.makoin order to replace the \nby <br>to fix the issue.

I don't really know the codebase. If you have a better fix, I'll be happy to do it.