在sphinx中使用doctoring导致文档中没有换行

时间:2016-04-02 21:28:43

标签: python python-sphinx docstring

我正在使用Sphinx为我的python包自动生成文档,我有一个定义如下的函数:

def swap_by_idx(self, idx1, idx2):
    """
    Args:
        idx1: the first index of the function to be swapped
        idx2: the second index of the function to be swapped
    """

在我运行sphinx build之后,我发现我的html格式文档如下:

swap_by_idx(idx1, idx2)[source]
Args:
idx1: the first index of the function to be swapped idx2: the second index of the function to be swapped

问题是第二个参数idx2 ...

没有换行符

我花了好几个小时但却找不到原因。

0 个答案:

没有答案